From 5a35377fedf0c80bddb7eabb44e94fcc754a25de Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 17 Jun 2019 11:39:56 +0200 Subject: [PATCH] Make with-suppressed-warnings work in cl-defmethod * 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 9013c1f0607..10190f49339 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -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") -- 2.39.2