GNU bug report logs -
#53526
29.0.50; macroexp-warn-and-return API change
Previous Next
Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date: Tue, 25 Jan 2022 16:57:01 UTC
Severity: normal
Merged with 53618
Found in version 29.0.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> No, its name was changed from "macroexp--" to "macroexp-" in Emacs-28,
>> specifically to make available for third party packages. It was
>> announced in etc/NEWS, for example.
> Are you aware of it being used anywhere else but lisp/emacs-lisp?
Yes and no: there's a use of `macroexp--warn-and-return` in `peg.el`
(in GNU ELPA). This should be updated to use `macroexp-warn-and-return`
when Emacs-28 is released.
But changing the API this way will discourage its use outside of Emacs
since it's be a pain to write code that deals with such changes (short
of imposing Emacs-29 as the minimum supported version).
>> Still, the current setup is really ugly: that var belongs in
>> `bytecomp.el`.
> Well, I suppose it could be defined in bytecomp.el and just declared in
> macroexp.el.
That's all we need.
> It's not going to get used before it's been initialised in
> bytecomp.el.
If that's the case, it's even better.
>> I'd put a double hyphen there simply because it's not something that we
>> want to expose as an official API. Just because the bytecompiler's
>> macroexpansion phase is implemented in a separate file doesn't justify
>> making the var public.
> OK, we can mange that.
Thanks.
> I suspect the difficulty in understanding this facility will have
> strongly dissuaded any external hackers from attempting to use it.
Could be.
I suspect it's more a lack of exposure and the fact that most macros are
quick hacks that don't bother to perform much checking.
But it's definitely a facility that's useful for libraries that mostly
define a DSL via macros, like `peg.el` and `bindat.el`.
Stefan
This bug report was last modified 3 years and 143 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.