* bug#29573: 26.0.90; Suppress warnings during elisp completion macroexpansion
@ 2017-12-05 1:23 Noam Postavsky
2017-12-11 23:47 ` Noam Postavsky
0 siblings, 1 reply; 2+ messages in thread
From: Noam Postavsky @ 2017-12-05 1:23 UTC (permalink / raw)
To: 29573
[-- Attachment #1: Type: text/plain, Size: 185 bytes --]
Tags: patch
Motivating example is use-package showing an error when given the
`elisp--witness-lisp' symbol by completion [1].
[1]: https://github.com/jwiegley/use-package/issues/524
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1490 bytes --]
From d73b0094c205e8b5762dc5e5833abdfb5841348f Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Mon, 4 Dec 2017 20:01:40 -0500
Subject: [PATCH] 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 5ba0978909..4207edb8af 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -307,6 +307,8 @@ elisp--local-variables-1
(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 @@ elisp--local-variables
(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)))
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#29573: 26.0.90; Suppress warnings during elisp completion macroexpansion
2017-12-05 1:23 bug#29573: 26.0.90; Suppress warnings during elisp completion macroexpansion Noam Postavsky
@ 2017-12-11 23:47 ` Noam Postavsky
0 siblings, 0 replies; 2+ messages in thread
From: Noam Postavsky @ 2017-12-11 23:47 UTC (permalink / raw)
To: 29573
tags 29573 fixed
close 29573 26.1
quit
Pushed to emacs-26.
[2: 51911dae14]: 2017-12-11 17:38:28 -0500
Suppress warnings during elisp completion macroexpansion
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=51911dae14ecaf6c6eb22641c3189c6fa97ab24a
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-11 23:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-05 1:23 bug#29573: 26.0.90; Suppress warnings during elisp completion macroexpansion Noam Postavsky
2017-12-11 23:47 ` Noam Postavsky
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.