]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak recent bytecomp defvaralias change
authorGlenn Morris <rgm@gnu.org>
Fri, 20 Apr 2018 23:02:16 +0000 (19:02 -0400)
committerGlenn Morris <rgm@gnu.org>
Fri, 20 Apr 2018 23:02:16 +0000 (19:02 -0400)
* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defvar-function):
Respect with-no-warnings.

lisp/emacs-lisp/bytecomp.el

index 50e67046e8b9429d2c022a8a67159d9be56fc696..ad6b5b7ce2161828a00b5a46dded27bcac72e8d2 100644 (file)
@@ -2433,8 +2433,9 @@ list that represents a doc string reference.
   (pcase form
     (`(defvaralias ,_ ',newname . ,_)
      (when (memq newname byte-compile-bound-variables)
-       (byte-compile-warn
-        "Alias for `%S' should be declared before its referent" newname))))
+       (if (byte-compile-warning-enabled-p 'suspicious)
+           (byte-compile-warn
+            "Alias for `%S' should be declared before its referent" newname)))))
   (byte-compile-keep-pending form))
 
 (put 'custom-declare-variable 'byte-hunk-handler