emacs-diffs
[Top][All Lists]
Advanced

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

master 5c93063: * lisp/newcomment.el: Allow 'comment-continue' with whit


From: Juri Linkov
Subject: master 5c93063: * lisp/newcomment.el: Allow 'comment-continue' with whitespace (bug#47167)
Date: Thu, 18 Mar 2021 14:01:36 -0400 (EDT)

branch: master
commit 5c93063129de0a2005aac1ffe1c48c372b918634
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    * lisp/newcomment.el: Allow 'comment-continue' with whitespace (bug#47167)
    
    * lisp/newcomment.el (comment-region-default-1): Still use 
'comment-continue'
    as a string with whitespace even when 'comment-padright' returns nil.
---
 lisp/newcomment.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index ea47eec..a5bfb06 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -1300,7 +1300,11 @@ out."
         (let ((s (comment-padleft comment-end numarg)))
           (and s (if (string-match comment-end-skip s) s
                    (comment-padright comment-end))))
-        (if multi (comment-padright comment-continue numarg))
+        (if multi
+             (or (comment-padright comment-continue numarg)
+                 ;; `comment-padright' returns nil when
+                 ;; `comment-continue' contains only whitespace
+                 (and (stringp comment-continue) comment-continue)))
         (if multi
             (comment-padleft (comment-string-reverse comment-continue) numarg))
         block



reply via email to

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