]> code.delx.au - gnu-emacs/commitdiff
Allow newlines inside cl function arglists
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 9 May 2016 23:53:20 +0000 (02:53 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Mon, 9 May 2016 23:53:20 +0000 (02:53 +0300)
* lisp/help.el (help-add-fundoc-usage): Allow newlines inside
ARGLIST (bug#21839).

lisp/help.el

index 061daacfdd383ff10a243ccd6894cc121718e336..72893754e1e097d8caf78122f061fe07889e861f 100644 (file)
@@ -1395,7 +1395,7 @@ ARGLIST can also be t or a string of the form \"(FUN ARG1 ARG2 ...)\"."
                (if (< (- (match-end 0) (match-beginning 0)) 2) "\n" "")
              "\n\n")
            (if (stringp arglist)
-                (if (string-match "\\`[^ ]+\\(.*\\))\\'" arglist)
+                (if (string-match "\\`[^ ]+\\(\\(?:.\\|\n\\)*\\))\\'" arglist)
                     (concat "(fn" (match-string 1 arglist) ")")
                   (error "Unrecognized usage format"))
              (help--make-usage-docstring 'fn arglist)))))