From f76666588d0c687a94d3ad4a97ea73e4a298ba79 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 13 Dec 2001 07:33:56 +0000 Subject: [PATCH] (ad-compile-function): Byte compile the function under another (uninterned) name. --- lisp/emacs-lisp/advice.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index c13bff9e7cc..79b4764da74 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: -- 2.39.2