diff options
author | Richard M. Stallman <rms@gnu.org> | 2002-07-07 09:37:09 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2002-07-07 09:37:09 +0000 |
commit | 004b6f61b33da8969984cab97932262a9e56e460 (patch) | |
tree | 805029ea0eaca0f77133ad70903ae04b23c14d2e /lisp/emacs-lisp/advice.el | |
parent | 8fd9c1745e9d76b93593464d7290d7beb9be192d (diff) | |
download | emacs-004b6f61b33da8969984cab97932262a9e56e460.tar.gz emacs-004b6f61b33da8969984cab97932262a9e56e460.tar.bz2 emacs-004b6f61b33da8969984cab97932262a9e56e460.zip |
(ad-compile-function): Disable cl-function warnings if cl is loaded.
Diffstat (limited to 'lisp/emacs-lisp/advice.el')
-rw-r--r-- | lisp/emacs-lisp/advice.el | 9 |
1 files changed, 8 insertions, 1 deletions
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)))))) |