Allow newlines inside cl function arglists

* lisp/help.el (help-add-fundoc-usage): Allow newlines inside
ARGLIST (bug#21839).
This commit is contained in:
Dmitry Gutov 2016-05-10 02:53:20 +03:00
parent 963541a654
commit d0d9f55b63

View 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)))))