Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
41935:a9d361663625 | 41936:2fba35852455 |
---|---|
2696 (interactive "aByte-compile function: ") | 2696 (interactive "aByte-compile function: ") |
2697 (if (ad-is-compilable function) | 2697 (if (ad-is-compilable function) |
2698 ;; Need to turn off auto-activation | 2698 ;; Need to turn off auto-activation |
2699 ;; because `byte-compile' uses `fset': | 2699 ;; because `byte-compile' uses `fset': |
2700 (ad-with-auto-activation-disabled | 2700 (ad-with-auto-activation-disabled |
2701 (byte-compile function)))) | 2701 (let ((symbol (make-symbol "advice-compilation"))) |
2702 (fset symbol (symbol-function function)) | |
2703 (byte-compile symbol) | |
2704 (fset function (symbol-function symbol)))))) | |
2702 | 2705 |
2703 | 2706 |
2704 ;; @@ Constructing advised definitions: | 2707 ;; @@ Constructing advised definitions: |
2705 ;; ==================================== | 2708 ;; ==================================== |
2706 ;; | 2709 ;; |