emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compile.el legacy compatibility


From: Stefan Monnier
Subject: Re: compile.el legacy compatibility
Date: Sun, 24 Mar 2019 13:51:04 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> I was wondering what is your policy on removing obsolete content. I think
> it would be a much better for current users if "line" was handled like all
> the other fields instead of reverting the entire error to legacy mode in an
> undocumented way.

This current case can be handled as follows (by order of my own preferences):
- Drop this old compatibility.
- Refine the compatibility check: the old code only allowed (FILE LINE COLUMN)
  and not the more general (BEG-LINE . END-LINE) case, so we could still support
  the old (FILE LINE COLUMN) case where LINE is a function while also
  supporting the case where LINE is (BEG-LINE . END-LINE) and BEG-LINE
  and END-LINE can be functions.
- Refine the compatibility by catching a `wrong-number-of-arguments`
  error when calling the LINE function with 2 args and considering it
  a tell-tale sign that it's not an old-style LINE function but
  a new-style function instead.
- Refine the compatibility by catching a `wrong-number-of-arguments`
  error when calling the LINE function with 0 args and considering it
  a sign that it's probably an old-style LINE function.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]