1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00

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.
This commit is contained in:
Noam Postavsky 2017-12-04 20:01:40 -05:00
parent a36a090a95
commit 51911dae14

View File

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