diff options
author | Noam Postavsky <npostavs@gmail.com> | 2018-03-06 19:26:32 -0500 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2018-03-10 19:51:28 -0500 |
commit | 864643929b7e241020c3a43b830d6ccf1c1726d8 (patch) | |
tree | 779b02cfa96563b7fcafc339982351f7717452d5 /lisp/emacs-lisp/bytecomp.el | |
parent | fda58fbc245a3f6f6722261ffb2e2262231bd4ea (diff) | |
download | emacs-864643929b7e241020c3a43b830d6ccf1c1726d8.tar.gz emacs-864643929b7e241020c3a43b830d6ccf1c1726d8.tar.bz2 emacs-864643929b7e241020c3a43b830d6ccf1c1726d8.zip |
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.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 1bf6d04b63b..2a986f6cbbc 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) |