summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2018-04-20 19:02:16 -0400
committerGlenn Morris <rgm@gnu.org>2018-04-20 19:02:16 -0400
commit94e794c8d8b93a1d6813742da12135f2746ef80b (patch)
tree26cb4425226f2ab41c832764585a6a5ac9548649 /lisp/emacs-lisp
parent18de2ada243653ece98b18044233e5d29eee5903 (diff)
downloademacs-94e794c8d8b93a1d6813742da12135f2746ef80b.tar.gz
emacs-94e794c8d8b93a1d6813742da12135f2746ef80b.tar.bz2
emacs-94e794c8d8b93a1d6813742da12135f2746ef80b.zip
Tweak recent bytecomp defvaralias change
* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defvar-function): Respect with-no-warnings.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 50e67046e8b..ad6b5b7ce21 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -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