diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 5ba09789097..4207edb8af5 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)))