summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/newcomment.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 6b6f2d0b0e8..aa58c02b237 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -481,11 +481,11 @@ If CONTINUE is non-nil, use the `comment-continue' markers if any."
;; Some comment-indent-function insist on not moving comments that
;; are in column 0, so we first go to the likely target column.
(indent-to comment-column)
- (setq begpos (point))
;; Ensure there's a space before the comment for things
;; like sh where it matters (as well as being neater).
- (unless (eq ?\ (char-syntax (char-before)))
+ (unless (memq (char-before) '(nil ?\n ?\t ?\ ))
(insert ?\ ))
+ (setq begpos (point))
(insert starter)
(setq cpos (point-marker))
(insert ender)))