From 004b6f61b33da8969984cab97932262a9e56e460 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 7 Jul 2002 09:37:09 +0000 Subject: [PATCH] (ad-compile-function): Disable cl-function warnings if cl is loaded. --- lisp/emacs-lisp/advice.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index 34e2a92ed37..1900dff4d6b 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -2698,7 +2698,14 @@ For that it has to be fbound with a non-autoload definition." ;; Need to turn off auto-activation ;; because `byte-compile' uses `fset': (ad-with-auto-activation-disabled - (let ((symbol (make-symbol "advice-compilation"))) + (require 'bytecomp) + (let ((symbol (make-symbol "advice-compilation")) + (byte-compile-warnings + (if (listp byte-compile-warnings) byte-compile-warnings + byte-compile-warning-types))) + (if (featurep 'cl) + (setq byte-compile-warnings + (remq 'cl-functions byte-compile-warnings))) (fset symbol (symbol-function function)) (byte-compile symbol) (fset function (symbol-function symbol)))))) -- 2.39.5