summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2021-03-18 20:01:26 +0200
committerJuri Linkov <juri@linkov.net>2021-03-18 20:01:26 +0200
commit5c93063129de0a2005aac1ffe1c48c372b918634 (patch)
treefa4f3360939c9b12f2f8610856c3e2fe8e2fa870
parentb0902d926dd837ad06c9c6bbde35a5411a351779 (diff)
downloademacs-5c93063129de0a2005aac1ffe1c48c372b918634.tar.gz
* 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.
-rw-r--r--lisp/newcomment.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index ea47eec4fda..a5bfb067954 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