bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#53618: 29.0.50; macroexp-warn-and-return incompatible change


From: Alan Mackenzie
Subject: bug#53618: 29.0.50; macroexp-warn-and-return incompatible change
Date: Sat, 29 Jan 2022 11:28:10 +0000

Hello, Stefan.

On Fri, Jan 28, 2022 at 19:37:01 -0500, Stefan Monnier wrote:
> Package: Emacs
> Version: 29.0.50


> Alan's symbols-with-pos has introduced a backward incompatible change to
> `macroexp-warn-and-return` by adding a new *first* argument `arg`.

Yes.

> The patch below changes that so the new argument comes last (and is
> optional).  Alan argued it's preferable for this arg to come first and
> the function was new in Emacs-28 so it's OK to break compatibility.

Something along those lines, yes.  The new argument is not in any sense
optional.  It is absolutely required in order to generate a correct
warning position.

> The patch below shows that indeed the arg is almost always
> desirable/needed to get the right position information (the default
> behavior when the arg is absent is not as good), so it's kind of pain
> having it as last arg.  And I'm not super happy with the long list of
> args of this function.

It is a kind of wierd function.  A long list of arguments is half to be
expected.

> But these arguments don't seem strong enough to justify
> breaking compatibility, hence the patch below.

There can be no compatibility here.  The new function needs that extra
argument.

How about, instead, declaring the old function to be obsolete, to be
replaced by a new one.  The new name could be something like
macroexp-warn-and-return-x.  The position of the new argument in the
argument list is not terribly important, though given its importance,
being in first position might not be such a bad thing.

> Any objection?

Yes.  See above.

>         Stefan

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

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