Make with-suppressed-warnings work for macros, too

* lisp/emacs-lisp/macroexp.el (macroexp-macroexpand): Pass the
macro/alias symbol on to byte-compile-warning-enabled-p so that
with-suppressed-warnings works for macros, too.
This commit is contained in:
Lars Ingebrigtsen 2019-11-20 12:28:37 +01:00
parent 2709b1e4e5
commit 5c5c1b5593

View file

@ -187,7 +187,7 @@ and also to avoid outputting the warning during normal execution."
(symbolp (car form))
(get (car form) 'byte-obsolete-info)
(or (not (fboundp 'byte-compile-warning-enabled-p))
(byte-compile-warning-enabled-p 'obsolete)))
(byte-compile-warning-enabled-p 'obsolete (car form))))
(let* ((fun (car form))
(obsolete (get fun 'byte-obsolete-info)))
(macroexp--warn-and-return