GNU bug report logs -
#67455
Record source position, etc., in doc strings, and use this in *Help* and backtraces.
Previous Next
Full log
Message #64 received at 67455 <at> debbugs.gnu.org (full text, mbox):
Hello Stefan.
On Wed, Mar 13, 2024 at 07:52:50 -0400, Stefan Monnier wrote:
> > OK, so it seems like I'll need a new pcase arm in macroexp--expand-all,
> > and this new code will need to handle (function (cons 'lambda ...)), and
> > the like.
> If macroexp--expand-all receives code of the form
> (function (cons 'lambda ...))
> it means it received broken code.
> IOW, such an arm will never do anything useful (the best it can do is
> emit a warning).
> I suspect what you're looking for is yet different.
How about the following (as yet vague) idea?
(i) Amend backquote slightly so that the integer part of the result of
backquote-process gets transmitted to the caller, somehow. This would
let macroexp--expand-all know it's dealing with smething awkward like
`#'(lambda ,@args . ,body).
(ii) On encountering such, m--e-all would insert a call to (new macro)
macroexp--maybe-posify-lamda-form at ME1 time.
(iii) At ME2 time, m--e-all should be able to tell whether or not the
lambda form is "real". In this case the macro would be replaced by a
call to (existing) byte-run--posify-lambda-position. Whether or not this
is done, the SWP lambda would be stripped of its position.
This might work. What do you think?
> Stefan
--
Alan Mackenzie (Nuremberg, Germany)
This bug report was last modified 1 year and 12 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.