]> git.eshelyaron.com Git - emacs.git/commitdiff
* help-fns.el (help-function-arglist): Don't check advertised-signature-table.
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 2 Oct 2009 14:36:54 +0000 (14:36 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 2 Oct 2009 14:36:54 +0000 (14:36 +0000)
(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.

lisp/ChangeLog
lisp/emacs-lisp/eldoc.el
lisp/help-fns.el

index 4baa1ad304c8e970c5b0b0ac846d25e3e7765fe5..58349083f5574a7b16e27f650f90dfaa3c23f31c 100644 (file)
@@ -1,3 +1,12 @@
+2009-10-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/eldoc.el (eldoc-get-fnsym-args-string):
+       Obey advertised-signature-table.
+
+       * 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.
+
 2009-10-02  Michael Albinus  <michael.albinus@gmx.de>
 
        * simple.el (start-file-process): Say in the doc-string, that file
@@ -9,8 +18,8 @@
        (ange-ftp-delete-directory): Implement RECURSIVE case.  Change to
        root directory ("device busy" error otherwise).
 
-       * net/tramp-smb.el (tramp-smb-handle-make-directory-internal): Flush
-       file properties of created directory.
+       * net/tramp-smb.el (tramp-smb-handle-make-directory-internal):
+       Flush file properties of created directory.
 
 2009-10-02  Eli Zaretskii  <eliz@gnu.org>
 
index 47f4dd470bc24e7b7c2742874216fe5152fc4da4..f1a92035bb9032bbca0dfe8594d83d558d30f74e 100644 (file)
@@ -290,11 +290,14 @@ or elsewhere, return a 1-line docstring.  Calls the functions
 former calls `eldoc-argument-case'; the latter gives the
 function name `font-lock-function-name-face', and optionally
 highlights argument number INDEX."
-  (let (args doc)
+  (let (args doc advertised)
     (cond ((not (and sym (symbolp sym) (fboundp sym))))
          ((and (eq sym (aref eldoc-last-data 0))
                (eq 'function (aref eldoc-last-data 2)))
           (setq doc (aref eldoc-last-data 1)))
+         ((listp (setq advertised (gethash (indirect-function sym)
+                                           advertised-signature-table t)))
+          (setq args advertised))
          ((setq doc (help-split-fundoc (documentation sym t) sym))
           (setq args (car doc))
           ;; Remove any enclosing (), since e-function-argstring adds them.
index a080cd22ea0e441567ce072f95ab8e9aba1b4d46..e30fe28682c0c03a14d5c09238b1cb0ed700bf7c 100644 (file)
@@ -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)