]> git.eshelyaron.com Git - emacs.git/commitdiff
(ad-compile-function):
authorRichard M. Stallman <rms@gnu.org>
Tue, 11 Dec 2001 06:07:07 +0000 (06:07 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 11 Dec 2001 06:07:07 +0000 (06:07 +0000)
Byte compile the function under another (uninterned) name.

lisp/emacs-lisp/advice.el

index 36ae0e33884d47233b67478119c1ed0b4db4e33e..b03dd3603bd6947e1e3db21b7c6c3a597eab4dda 100644 (file)
@@ -2698,7 +2698,10 @@ 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
-       (byte-compile function))))
+       (let ((symbol (make-symbol "advice-compilation")))
+        (fset symbol (symbol-function function))
+        (byte-compile symbol)
+        (fset function (symbol-function symbol))))))
 
 
 ;; @@ Constructing advised definitions: