emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-25 f79c352: Redo the fix for bug#21839


From: Dmitry Gutov
Subject: [Emacs-diffs] emacs-25 f79c352: Redo the fix for bug#21839
Date: Wed, 11 May 2016 22:14:09 +0000 (UTC)

branch: emacs-25
commit f79c3523354e45e2dbc97bb92718c9941c1a1a3b
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Redo the fix for bug#21839
    
    * lisp/help.el (help-add-fundoc-usage): Undo the previous change.
    (help--make-usage-docstring): Escape newlines when printing.
    
    * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
    Ditto (bug#21839).
---
 lisp/emacs-lisp/cl-macs.el |    3 ++-
 lisp/help.el               |    5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index ae52e8b..68abe67 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -299,7 +299,8 @@ FORM is of the form (ARGS . BODY)."
                                ;; Be careful with make-symbol and (back)quote,
                                ;; see bug#12884.
                                (help--docstring-quote
-                                (let ((print-gensym nil) (print-quoted t))
+                                (let ((print-gensym nil) (print-quoted t)
+                                      (print-escape-newlines t))
                                   (format "%S" (cons 'fn (cl--make-usage-args
                                                           orig-args))))))
                               header)))
diff --git a/lisp/help.el b/lisp/help.el
index 7289375..57f358b 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -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 "\\`[^ ]+\\(\\(?:.\\|\n\\)*\\))\\'" arglist)
+                (if (string-match "\\`[^ ]+\\(.*\\))\\'" arglist)
                     (concat "(fn" (match-string 1 arglist) ")")
                   (error "Unrecognized usage format"))
              (help--make-usage-docstring 'fn arglist)))))
@@ -1468,7 +1468,8 @@ the same names as used in the original source code, when 
possible."
 (define-obsolete-function-alias 'help-make-usage 'help--make-usage "25.1")
 
 (defun help--make-usage-docstring (fn arglist)
-  (help--docstring-quote (format "%S" (help--make-usage fn arglist))))
+  (let ((print-escape-newlines t))
+    (help--docstring-quote (format "%S" (help--make-usage fn arglist)))))
 
 
 (provide 'help)



reply via email to

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