]> git.eshelyaron.com Git - emacs.git/commitdiff
Make with-suppressed-warnings work in cl-defmethod
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 17 Jun 2019 09:39:56 +0000 (11:39 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 17 Jun 2019 09:39:56 +0000 (11:39 +0200)
* lisp/emacs-lisp/cl-generic.el (cl-defmethod): Pass the symbol
name on to `byte-compile-warning-enabled-p' to make
with-suppressed-warnings work in cl-defmethods, too.

lisp/emacs-lisp/cl-generic.el

index 9013c1f0607f1c3b4e0e247af46a0b9385575ca0..10190f49339cb5a437553a5af0144c4c63ca09f6 100644 (file)
@@ -450,7 +450,7 @@ The set of acceptable TYPEs (also called \"specializers\") is defined
       `(progn
          ,(and (get name 'byte-obsolete-info)
                (or (not (fboundp 'byte-compile-warning-enabled-p))
-                   (byte-compile-warning-enabled-p 'obsolete))
+                   (byte-compile-warning-enabled-p 'obsolete name))
                (let* ((obsolete (get name 'byte-obsolete-info)))
                  (macroexp--warn-and-return
                   (macroexp--obsolete-warning name obsolete "generic function")