Tweak recent bytecomp defvaralias change

* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defvar-function):
Respect with-no-warnings.
This commit is contained in:
Glenn Morris 2018-04-20 19:02:16 -04:00
parent 18de2ada24
commit 94e794c8d8

View 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