GNU bug report logs - #21839
25.0.50; can't use newlines in defaults in cl functions

Previous Next

Package: emacs;

Reported by: "Paul M. Rodriguez" <paulmrodriguez <at> gmail.com>

Date: Thu, 5 Nov 2015 23:25:02 UTC

Severity: normal

Merged with 18039

Found in versions 24.5, 24.3, 25.0.50

Fixed in version 25.0.94

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #12 received at 21839-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: "Paul M. Rodriguez" <paulmrodriguez <at> gmail.com>, 21839-done <at> debbugs.gnu.org
Subject: Re: bug#21839: 25.0.50; can't use newlines in defaults in cl functions
Date: Tue, 10 May 2016 02:54:59 +0300
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)))))






This bug report was last modified 9 years and 21 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.