]> git.eshelyaron.com Git - emacs.git/commitdiff
(ad-compile-function): Disable cl-function warnings if cl is loaded.
authorRichard M. Stallman <rms@gnu.org>
Sun, 7 Jul 2002 09:37:09 +0000 (09:37 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 7 Jul 2002 09:37:09 +0000 (09:37 +0000)
lisp/emacs-lisp/advice.el

index 34e2a92ed37df20edff09924c062a0dab190accc..1900dff4d6bdb7d25adfe602a44ed1b9e33cbc86 100644 (file)
@@ -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))))))