aboutsummaryrefslogtreecommitdiffstats
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.el19
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index 2a2bcca7007..d383650f4e5 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -1054,9 +1054,9 @@
1054;; (print "Let's clean up now!")) 1054;; (print "Let's clean up now!"))
1055;; foo 1055;; foo
1056;; 1056;;
1057;; Now `foo's advice is byte-compiled: 1057;; Now `foo's advice is compiled:
1058;; 1058;;
1059;; (byte-code-function-p 'ad-Advice-foo) 1059;; (compiled-function-p 'ad-Advice-foo)
1060;; t 1060;; t
1061;; 1061;;
1062;; (foo 3) 1062;; (foo 3)
@@ -1298,7 +1298,7 @@
1298;; constructed during preactivation was used, even though we did not specify 1298;; constructed during preactivation was used, even though we did not specify
1299;; the `compile' flag: 1299;; the `compile' flag:
1300;; 1300;;
1301;; (byte-code-function-p 'ad-Advice-fum) 1301;; (compiled-function-p 'ad-Advice-fum)
1302;; t 1302;; t
1303;; 1303;;
1304;; (fum 2) 1304;; (fum 2)
@@ -1329,7 +1329,7 @@
1329;; 1329;;
1330;; A new uncompiled advised definition got constructed: 1330;; A new uncompiled advised definition got constructed:
1331;; 1331;;
1332;; (byte-code-function-p 'ad-Advice-fum) 1332;; (compiled-function-p 'ad-Advice-fum)
1333;; nil 1333;; nil
1334;; 1334;;
1335;; (fum 2) 1335;; (fum 2)
@@ -1580,8 +1580,6 @@
1580 :link '(custom-manual "(elisp)Advising Functions") 1580 :link '(custom-manual "(elisp)Advising Functions")
1581 :group 'lisp) 1581 :group 'lisp)
1582 1582
1583(defconst ad-version "2.14")
1584
1585;;;###autoload 1583;;;###autoload
1586(defcustom ad-redefinition-action 'warn 1584(defcustom ad-redefinition-action 'warn
1587 "Defines what to do with redefinitions during Advice de/activation. 1585 "Defines what to do with redefinitions during Advice de/activation.
@@ -2118,9 +2116,9 @@ the cache-id will clear the cache."
2118 2116
2119(defsubst ad-compiled-p (definition) 2117(defsubst ad-compiled-p (definition)
2120 "Return non-nil if DEFINITION is a compiled byte-code object." 2118 "Return non-nil if DEFINITION is a compiled byte-code object."
2121 (or (byte-code-function-p definition) 2119 (or (compiled-function-p definition)
2122 (and (macrop definition) 2120 (and (macrop definition)
2123 (byte-code-function-p (ad-lambdafy definition))))) 2121 (compiled-function-p (ad-lambdafy definition)))))
2124 2122
2125(defsubst ad-compiled-code (compiled-definition) 2123(defsubst ad-compiled-code (compiled-definition)
2126 "Return the byte-code object of a COMPILED-DEFINITION." 2124 "Return the byte-code object of a COMPILED-DEFINITION."
@@ -3250,6 +3248,9 @@ Use only in REAL emergencies."
3250 (message "Oops! Left over advised function %S" function) 3248 (message "Oops! Left over advised function %S" function)
3251 (ad-pop-advised-function function))) 3249 (ad-pop-advised-function function)))
3252 3250
3251(defconst ad-version "2.14")
3252(make-obsolete-variable 'ad-version 'emacs-version "29.1")
3253
3253(provide 'advice) 3254(provide 'advice)
3254 3255
3255;;; advice.el ends here 3256;;; advice.el ends here