]> git.eshelyaron.com Git - emacs.git/commitdiff
Use `advice--cd*r` where applicable
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 26 Apr 2022 21:31:13 +0000 (17:31 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 26 Apr 2022 21:36:13 +0000 (17:36 -0400)
* 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`.

lisp/emacs-lisp/advice.el
lisp/emacs-lisp/bytecomp.el
lisp/help.el

index 8e43ae68072fc4cbf0b9425eae9a561e9fdd15f1..86a42b208e7f0e685e10345ee48ddf72128e882c 100644 (file)
@@ -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)))
index 28237d67d297d96ff79ee80cc1c65567ac8765de..c0dffe544cfe207d8b31bb965039814e05cd3372 100644 (file)
@@ -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
index c5de59d6bc76fa004d514d3f822c050c5b1be945..2d08ceb86c75608ca58efde9a4e0d5eb6f3cc4b2 100644 (file)
@@ -2039,7 +2039,7 @@ the same names as used in the original source code, when possible."
   (if (and (symbolp def) (fboundp def)) (setq def (indirect-function def)))
   ;; Advice wrappers have "catch all" args, so fetch the actual underlying
   ;; function to find the real arguments.
-  (while (advice--p def) (setq def (advice--cdr def)))
+  (setq def (advice--cd*r def))
   ;; If definition is a macro, find the function inside it.
   (if (eq (car-safe def) 'macro) (setq def (cdr def)))
   (cond