diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-10-02 14:36:54 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-10-02 14:36:54 +0000 |
commit | 8d6c1239cb77da219180facf7937c259fc66767c (patch) | |
tree | fe57546bf7b7a8be5bbbe76a2a174caf95f50b70 /lisp/help-fns.el | |
parent | c4861de07b4cb7d2379c621bb67d44dd3497efff (diff) | |
download | emacs-8d6c1239cb77da219180facf7937c259fc66767c.tar.gz |
* help-fns.el (help-function-arglist): Don't check advertised-signature-table.
(describe-function-1): Do it here instead so it also applies to subrs.
* emacs-lisp/eldoc.el (eldoc-get-fnsym-args-string):
Obey advertised-signature-table.
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r-- | lisp/help-fns.el | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index a080cd22ea0..e30fe28682c 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -101,15 +101,13 @@ 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. - (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))))) + (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) @@ -469,14 +467,17 @@ suitable file is found, return nil." (re-search-backward "`\\([^`']+\\)'" nil t) (help-xref-button 1 'help-function-cmacro function lib))))) (princ ".\n\n")) - (let* ((arglist (help-function-arglist def)) + (let* ((advertised (gethash def advertised-signature-table t)) + (arglist (if (listp advertised) + advertised (help-function-arglist def))) (doc (documentation function)) (usage (help-split-fundoc doc function))) (with-current-buffer standard-output ;; If definition is a keymap, skip arglist note. (unless (keymapp function) + (if usage (setq doc (cdr usage))) (let* ((use (cond - (usage (setq doc (cdr usage)) (car usage)) + ((and usage (not (listp advertised))) (car usage)) ((listp arglist) (format "%S" (help-make-usage function arglist))) ((stringp arglist) arglist) |