summaryrefslogtreecommitdiff
path: root/lisp/help.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2017-07-14 11:27:21 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2017-07-14 11:27:21 -0400
commit6e2d6d54e1236216462c13655ea1fe573d9672e7 (patch)
treea5e1af3e57a5d1c3c7bf7828a60f6ab7c6e28f68 /lisp/help.el
parent583995c62dd424775dda33d5134ce04bee2ae685 (diff)
downloademacs-6e2d6d54e1236216462c13655ea1fe573d9672e7.tar.gz
* lisp/emacs-lisp/bytecomp.el: Fix bug#14860.
* lisp/emacs-lisp/bytecomp.el (byte-compile--function-signature): New fun. Dig into advice wrappers to find the "real" signature. (byte-compile-callargs-warn, byte-compile-arglist-warn): Use it. (byte-compile-arglist-signature): Don't bother with "new-style" arglists, since bytecode functions are now handled in byte-compile--function-signature. * lisp/files.el (create-file-buffer, insert-directory): Remove workaround introduced for (bug#14860). * lisp/help-fns.el (help-fns--analyse-function): `nadvice` is preloaded. * lisp/help.el (help-function-arglist): Dig into advice wrappers to find the "real" signature.
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 0fb1c2dab77..bc7ee2c9b1b 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1384,6 +1384,9 @@ If PRESERVE-NAMES is non-nil, return a formal arglist that uses
the same names as used in the original source code, when possible."
;; Handle symbols aliased to other symbols.
(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)))
;; If definition is a macro, find the function inside it.
(if (eq (car-safe def) 'macro) (setq def (cdr def)))
(cond