GNU bug report logs - #29573
26.0.90; Suppress warnings during elisp completion macroexpansion

Previous Next

Package: emacs;

Reported by: Noam Postavsky <npostavs <at> users.sourceforge.net>

Date: Tue, 5 Dec 2017 01:24:02 UTC

Severity: normal

Tags: fixed, patch

Found in version 26.0.90

Fixed in version 26.1

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29573 in the body.
You can then email your comments to 29573 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#29573; Package emacs. (Tue, 05 Dec 2017 01:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Noam Postavsky <npostavs <at> users.sourceforge.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 05 Dec 2017 01:24:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.90; Suppress warnings during elisp completion macroexpansion
Date: Mon, 04 Dec 2017 20:23:42 -0500
[Message part 1 (text/plain, inline)]
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

[0001-Suppress-warnings-during-elisp-completion-macroexpan.patch (text/x-diff, inline)]
From d73b0094c205e8b5762dc5e5833abdfb5841348f Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> 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


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29573; Package emacs. (Mon, 11 Dec 2017 23:49:02 GMT) Full text and rfc822 format available.

Message #8 received at 29573 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: 29573 <at> debbugs.gnu.org
Subject: Re: bug#29573: 26.0.90;
 Suppress warnings during elisp completion macroexpansion
Date: Mon, 11 Dec 2017 18:47:53 -0500
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




Added tag(s) fixed. Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Mon, 11 Dec 2017 23:49:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 26.1, send any further explanations to 29573 <at> debbugs.gnu.org and Noam Postavsky <npostavs <at> users.sourceforge.net> Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Mon, 11 Dec 2017 23:49:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 09 Jan 2018 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 166 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.