emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 4eb1e7f: * lisp/help.el: Fix bug with incorrect arg


From: Stefan Monnier
Subject: [Emacs-diffs] master 4eb1e7f: * lisp/help.el: Fix bug with incorrect arglist string
Date: Wed, 28 Oct 2015 00:18:48 +0000

branch: master
commit 4eb1e7f96b6c3758c321aed7523502089a8ede74
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * lisp/help.el: Fix bug with incorrect arglist string
    
    (help-add-fundoc-usage): Don't mistake a mis-formatted string for a list.
---
 lisp/help.el |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/help.el b/lisp/help.el
index 3387628..c558b65 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1394,9 +1394,10 @@ ARGLIST can also be t or a string of the form \"(FUN 
ARG1 ARG2 ...)\"."
            (if (string-match "\n?\n\\'" docstring)
                (if (< (- (match-end 0) (match-beginning 0)) 2) "\n" "")
              "\n\n")
-           (if (and (stringp arglist)
-                    (string-match "\\`([^ ]+\\(.*\\))\\'" arglist))
-               (concat "(fn" (match-string 1 arglist) ")")
+           (if (stringp arglist)
+                (if (string-match "\\`[^ ]+\\(.*\\))\\'" arglist)
+                    (concat "(fn" (match-string 1 arglist) ")")
+                  (error "Unrecognized usage format"))
              (help--make-usage-docstring 'fn arglist)))))
 
 (defun help-function-arglist (def &optional preserve-names)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]