1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

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.
This commit is contained in:
Noam Postavsky 2018-03-06 19:26:32 -05:00
parent fda58fbc24
commit 864643929b

View file

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