Subject: Re: bug#21839: 25.0.50; can't use newlines in defaults in cl functions
From: Dmitry Gutov <[email-masked]>
To: "Paul M. Rodriguez" <[email-masked]>, [email-masked]
Date: Tue, 10 May 2016 02:54:59 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Paul,

Thanks for the report. I've pushed the attached patch to emacs-25.

Not sure it's the best approach (I don't like seeing the unescaped 
newline in the resulting Help buffer), but it might have to do.

Closing.

diff --git a/lisp/help.el b/lisp/help.el
index 061daac..7289375 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1395,7 +1395,7 @@ help-add-fundoc-usage
  		(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)))))