Subject: Re: bug#58396: 29.0.50; Optimization failure for add-to-list

From: Eli Zaretskii <[email-masked]>
Date: Sat, 30 Sep 2023 17:26:26 +0300

> Cc: German Pacenza <[email-masked]>, [email-masked],
>  Lars Ingebrigtsen <[email-masked]>
> Date: Sat, 30 Sep 2023 12:39:57 +0200
> From:  Jens Schmidt via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> >From cc663ccb14f3fae361733fe9742d7c7d07274d54 Mon Sep 17 00:00:00 2001
> From: Jens Schmidt <[email-masked]>
> Date: Tue, 26 Sep 2023 22:26:15 +0200
> Subject: [PATCH] Silence macro expansion during completion-at-point
> 
> * lisp/progmodes/elisp-mode.el (elisp--local-variables): Silence
> messages.  Suppress all errors during macro expansion.  (Bug#58396)
> 
> Do not merge to master.
> ---
>  lisp/progmodes/elisp-mode.el | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
> index bd3916ce108..bc01058ff3c 100644
> --- a/lisp/progmodes/elisp-mode.el
> +++ b/lisp/progmodes/elisp-mode.el
> @@ -445,11 +445,19 @@ elisp--local-variables
>                                     (condition-case nil
>                                         (apply expander form args)
>                                       (error form))))
> +             ;; Avoid any macro expansion errors when attempting
> +             ;; completion at point (bug#58148).  As Stefan suggested
> +             ;; there: Silence messages [1] and suppress all errors
> +             ;; [3].  (Not avoiding compiler macros in the current
> +             ;; release branch, though.)

Most of this comment should be in the commit log message, I think, and
the [1] and [3] markers should be replaced with text telling what that
does.  Otherwise, the first patch is okay for the emacs-29 branch.

Regarding the second patch: if Stefan Monnier and Stefan Kangas are
okay with it, so am I.

Thanks.