bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#21839: 25.0.50; can't use newlines in defaults in cl functions


From: Dmitry Gutov
Subject: bug#21839: 25.0.50; can't use newlines in defaults in cl functions
Date: Tue, 10 May 2016 02:54:59 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1

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







reply via email to

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