[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 8646439 2/3: Let warning about (:foo) be suppressib
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master 8646439 2/3: Let warning about (:foo) be suppressible (Bug#30499) |
Date: |
Sat, 10 Mar 2018 21:03:26 -0500 (EST) |
branch: master
commit 864643929b7e241020c3a43b830d6ccf1c1726d8
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Let warning about (:foo) be suppressible (Bug#30499)
* lisp/emacs-lisp/bytecomp.el (byte-compile-form): Check
byte-compile-warning-enabled-p before warning about funcalling const
symbol.
---
lisp/emacs-lisp/bytecomp.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 1bf6d04..2a986f6 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -3119,7 +3119,8 @@ for symbols generated by the byte compiler itself."
(when (assq var byte-compile-lexical-variables)
(byte-compile-report-error
(format-message "%s cannot use lexical var `%s'" fn var))))))
- (when (macroexp--const-symbol-p fn)
+ (when (and (byte-compile-warning-enabled-p 'suspicious)
+ (macroexp--const-symbol-p fn))
(byte-compile-warn "`%s' called as a function" fn))
(when (and (byte-compile-warning-enabled-p 'interactive-only)
interactive-only)