diff lisp/emacs-lisp/advice.el @ 41936:2fba35852455

(ad-compile-function): Byte compile the function under another (uninterned) name.
author Richard M. Stallman <rms@gnu.org>
date Tue, 11 Dec 2001 06:07:07 +0000
parents 45db352a0971
children c726a3eeeb0f
line wrap: on
line diff
--- a/lisp/emacs-lisp/advice.el	Tue Dec 11 06:06:06 2001 +0000
+++ b/lisp/emacs-lisp/advice.el	Tue Dec 11 06:07:07 2001 +0000
@@ -2698,7 +2698,10 @@
       ;; 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: