emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-26 51911da 2/3: Suppress warnings during elisp compl


From: Noam Postavsky
Subject: [Emacs-diffs] emacs-26 51911da 2/3: Suppress warnings during elisp completion macroexpansion
Date: Mon, 11 Dec 2017 18:45:38 -0500 (EST)

branch: emacs-26
commit 51911dae14ecaf6c6eb22641c3189c6fa97ab24a
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    Suppress warnings during elisp completion macroexpansion
    
    Errors are already suppressed, therefore it is logical to suppress
    warnings as well.  Some macros (e.g., use-package) may produce
    warnings when given the `elisp--witness--lisp' symbol.
    * lisp/progmodes/elisp-mode.el (elisp--local-variables): Let-bind
    warning-minimum-log-level to :emergency.
---
 lisp/progmodes/elisp-mode.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 5ba0978..4207edb 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -307,6 +307,8 @@ Blank lines separate paragraphs.  Semicolons start comments.
           (setq sexp (ignore-errors (butlast sexp)))))
     res))
 
+(defvar warning-minimum-log-level)
+
 (defun elisp--local-variables ()
   "Return a list of locally let-bound variables at point."
   (save-excursion
@@ -328,7 +330,7 @@ Blank lines separate paragraphs.  Semicolons start comments.
                                      (error form))))
              (sexp
               (unwind-protect
-                  (progn
+                  (let ((warning-minimum-log-level :emergency))
                     (advice-add 'macroexpand :around macroexpand-advice)
                     (macroexpand-all sexp))
                 (advice-remove 'macroexpand macroexpand-advice)))



reply via email to

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