diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-04-26 17:31:13 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-04-26 17:36:13 -0400 |
commit | 4dba7c31a225950198482fe1eb558aac7a36d964 (patch) | |
tree | 43c08e79978499eda8db1206995c1a956253b042 /lisp/emacs-lisp | |
parent | 21112e3683dd7c1f88028bac4b1835204b8e30f8 (diff) | |
download | emacs-4dba7c31a225950198482fe1eb558aac7a36d964.tar.gz emacs-4dba7c31a225950198482fe1eb558aac7a36d964.tar.bz2 emacs-4dba7c31a225950198482fe1eb558aac7a36d964.zip |
Use `advice--cd*r` where applicable
* lisp/emacs-lisp/bytecomp.el (byte-compile--function-signature):
* lisp/emacs-lisp/advice.el (ad-get-orig-definition):
* lisp/help.el (help-function-arglist): Use `advice--cd*r`.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/advice.el | 3 | ||||
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index 8e43ae68072..86a42b208e7 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -1814,8 +1814,7 @@ Redefining advices affect the construction of an advised definition." (if (symbolp function) (setq function (if (fboundp function) (advice--strip-macro (symbol-function function))))) - (while (advice--p function) (setq function (advice--cdr function))) - function) + (advice--cd*r function)) (defun ad-clear-advicefunname-definition (function) (let ((advicefunname (ad-get-advice-info-field function 'advicefunname))) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 28237d67d29..c0dffe544cf 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1439,7 +1439,7 @@ when printing the error message." (and (eq 'macro (car-safe f)) (setq f (cdr f))) ;; Advice wrappers have "catch all" args, so fetch the actual underlying ;; function to find the real arguments. - (while (advice--p f) (setq f (advice--cdr f))) + (setq f (advice--cd*r f)) (if (eq (car-safe f) 'declared) (byte-compile-arglist-signature (nth 1 f)) (condition-case nil |