GNU bug report logs - #62189
29.0.60; complete-symbol while inside add-to-list form prints a warning

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Tue, 14 Mar 2023 16:10:01 UTC

Severity: minor

Found in version 29.0.60

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Spencer Baugh <sbaugh <at> janestreet.com>, 62189 <at> debbugs.gnu.org
Subject: bug#62189: 29.0.60; complete-symbol while inside add-to-list form prints a warning
Date: Tue, 14 Mar 2023 16:28:08 -0400
>> 1. Start emacs -Q and switch to *scratch*
>> 2. Type (add-to-list f
>> 3. Hit C-M-i to run complete-symbol
>> 4. Observe the following warning and error in the *Messages* buffer:
>> Warning: Optimization failure for add-to-list: Handler: add-to-list--anon-cmacro
>> (wrong-number-of-arguments (3 . 5) 2)
>
> That message is harmless,

Indeed, it's a mere warning about a failure to apply an optimization.

> so I don't think it's a bug.

But I do think it's a bug (I think we discussed this a few months ago,
probably in some other bug report): we should inhibit compiler macros
(and silence any other macro-expansion warnings)
during this kind of completion since it's normal to have
incomplete/invalid code at that point.

> Adding Stefan, who introduced the warning, in case he has comments.

The warning in valid and meaningful in other situations (e.g. if you
were to compile code that contains just `(add-to-list f)`), but here
it brings no value.


        Stefan





This bug report was last modified 1 year and 278 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.