emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 6cf7e676e9d: Silence macro expansion during completion at point


From: Stefan Monnier
Subject: emacs-29 6cf7e676e9d: Silence macro expansion during completion at point
Date: Thu, 5 Oct 2023 14:06:53 -0400 (EDT)

branch: emacs-29
commit 6cf7e676e9d4846a72d48f21168e92e4efcbf95a
Author: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    Silence macro expansion during completion at point
    
    To keep risk in the current release branch low, do not avoid compiler
    macros as suggested by Stefan in the bug, but rather suppress all errors.
    
    * lisp/progmodes/elisp-mode.el (elisp--local-variables): Silence
    messages.  Suppress all errors during macro expansion.  (Bug#58148)
    
    Do not merge to master.
---
 lisp/progmodes/elisp-mode.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index bd3916ce108..354d98c50dc 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -447,9 +447,14 @@ be used instead.
                                      (error form))))
              (sexp
               (unwind-protect
-                  (let ((warning-minimum-log-level :emergency))
+                  ;; Silence any macro expansion errors when
+                  ;; attempting completion at point (bug#58148).
+                  (let ((inhibit-message t)
+                        (warning-minimum-log-level :emergency))
                     (advice-add 'macroexpand :around macroexpand-advice)
-                    (macroexpand-all sexp))
+                    (condition-case nil
+                        (macroexpand-all sexp)
+                      (error sexp)))
                 (advice-remove 'macroexpand macroexpand-advice)))
              (vars (elisp--local-variables-1 nil sexp)))
         (delq nil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]