diff options
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r-- | lisp/help-fns.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 7608e9f24e9..53663d1aeeb 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -100,13 +100,15 @@ ARGLIST can also be t or a string of the form \"(FUN ARG1 ARG2 ...)\"." ;; Handle symbols aliased to other symbols. (if (and (symbolp def) (fboundp def)) (setq def (indirect-function def))) ;; If definition is a macro, find the function inside it. - (if (eq (car-safe def) 'macro) (setq def (cdr def))) - (cond - ((byte-code-function-p def) (aref def 0)) - ((eq (car-safe def) 'lambda) (nth 1 def)) - ((and (eq (car-safe def) 'autoload) (not (eq (nth 4 def) 'keymap))) - "[Arg list not available until function definition is loaded.]") - (t t))) + (let ((advertised (gethash def advertised-signature-table t))) + (if (listp advertised) advertised + (if (eq (car-safe def) 'macro) (setq def (cdr def))) + (cond + ((byte-code-function-p def) (aref def 0)) + ((eq (car-safe def) 'lambda) (nth 1 def)) + ((and (eq (car-safe def) 'autoload) (not (eq (nth 4 def) 'keymap))) + "[Arg list not available until function definition is loaded.]") + (t t))))) (defun help-make-usage (function arglist) (cons (if (symbolp function) function 'anonymous) |