summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2001-12-11 06:07:07 +0000
committerRichard M. Stallman <rms@gnu.org>2001-12-11 06:07:07 +0000
commitfe30e73fcd14e37ac5cb8581e4b43ef97b23f386 (patch)
tree1e8931f3bd21ddbeeb9bbce366bbef980edea1b5 /lisp/emacs-lisp
parent38eba48567d1d45803af42fe4728c9c4814fae37 (diff)
downloademacs-fe30e73fcd14e37ac5cb8581e4b43ef97b23f386.tar.gz
emacs-fe30e73fcd14e37ac5cb8581e4b43ef97b23f386.tar.bz2
emacs-fe30e73fcd14e37ac5cb8581e4b43ef97b23f386.zip
(ad-compile-function):
Byte compile the function under another (uninterned) name.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/advice.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index 36ae0e33884..b03dd3603bd 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -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: