]> git.eshelyaron.com Git - emacs.git/commitdiff
Let warning about (:foo) be suppressible (Bug#30499)
authorNoam Postavsky <npostavs@gmail.com>
Wed, 7 Mar 2018 00:26:32 +0000 (19:26 -0500)
committerNoam Postavsky <npostavs@gmail.com>
Sun, 11 Mar 2018 00:51:28 +0000 (19:51 -0500)
* 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

index 1bf6d04b63bbaab67d50f21a9b49be28a408143f..2a986f6cbbc9dea1a0406927cb8aacfb0a18d87c 100644 (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)