unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Spencer Baugh <sbaugh@janestreet.com>, 62189@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	[thread overview]
Message-ID: <jwvzg8frsih.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83edprruxa.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 14 Mar 2023 21:32:01 +0200")

>> 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






  reply	other threads:[~2023-03-14 20:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14 16:09 bug#62189: 29.0.60; complete-symbol while inside add-to-list form prints a warning Spencer Baugh
2023-03-14 19:32 ` Eli Zaretskii
2023-03-14 20:28   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-03-15  3:20     ` Eli Zaretskii
2023-03-15 17:54       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-16  5:14       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvzg8frsih.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=62189@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=sbaugh@janestreet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).