]> git.eshelyaron.com Git - emacs.git/commitdiff
Make with-suppressed-warnings work for macros, too
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 20 Nov 2019 11:28:37 +0000 (12:28 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 20 Nov 2019 11:28:43 +0000 (12:28 +0100)
* 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.

lisp/emacs-lisp/macroexp.el

index 72198c440042ff46f6d47a20ba12a6a984a0e2ca..329b48d179e6f6a1d358e8ae06578940b1c1b029 100644 (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