summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/advice.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/advice.el')
-rw-r--r--lisp/emacs-lisp/advice.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index d07081d1a8e..73d11fc8aa8 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -2042,8 +2042,6 @@ in that CLASS."
function class name)))
(error "ad-remove-advice: `%s' is not advised" function)))
-(declare-function comp-subr-trampoline-install "comp")
-
;;;###autoload
(defun ad-add-advice (function advice class position)
"Add a piece of ADVICE to FUNCTION's list of advices in CLASS.
@@ -2067,9 +2065,6 @@ mapped to the closest extremal position).
If FUNCTION was not advised already, its advice info will be
initialized. Redefining a piece of advice whose name is part of
the cache-id will clear the cache."
- (when (and (featurep 'native-compile)
- (subr-primitive-p (symbol-function function)))
- (comp-subr-trampoline-install function))
(cond ((not (ad-is-advised function))
(ad-initialize-advice-info function)
(ad-set-advice-info-field
@@ -2850,7 +2845,11 @@ The current definition and its cache-id will be put into the cache."
(old-ispec (interactive-form advicefunname)))
(fset advicefunname
(or verified-cached-definition
- (ad-make-advised-definition function)))
+ (eval
+ (ad-make-advised-definition function)
+ ;; We don't keep track of the `lexical-binding' of the
+ ;; various chunks: assume it's the old dynbound dialect.
+ nil)))
(put advicefunname 'function-documentation
`(ad--make-advised-docstring ',advicefunname))
(unless (equal (interactive-form advicefunname) old-ispec)
@@ -3131,6 +3130,7 @@ usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...)
[DOCSTRING] [INTERACTIVE-FORM]
BODY...)"
(declare (doc-string 3) (indent 2)
+ (obsolete "use `advice-add' or `define-advice'" "30.1")
(debug (&define name ;; thing being advised.
(name ;; class is [&or "before" "around" "after"
;; "activation" "deactivation"]