GNU bug report logs -
#58396
29.0.50; Optimization failure for add-to-list
Previous Next
Full log
Message #25 received at 58396 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen [2022-10-11 02:28:40] wrote:
> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> I'm not sure which part you don't understand above, so I'll only explain
>> the general situation: to allow completion of local variable names, we
>> analyze the surrounding code, but in order to do that without having to
>> write ad-hoc code that knows about all the macros out there that can
>> introduce new vars, we take the "surrounding code" and macroexpand the
>> hell out of it so that we can then traverse the result looking only for
>> `let/let*/lambda/condition-case`.
>
> But why is it calling add-to-list--anon-cmacro with the wrong number of
> parameters?
Because that's the sort of error you can get if you try to macro-expand
code that's syntactically invalid. E.g. try to compile a file with
(add-to-list x)
and you should see a similar error. For `elisp--local-variables`,
syntactically invalid code is the normal case (more or less) both
because it's used when we're in the middle of writing the code, and also
because of how it works (it takes the code from beginning-of-defun up
to point and throws away whatever follows, just adding enough closing
parens that the resutling string is `read`able).
Stefan
This bug report was last modified 1 year and 320 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.