summaryrefslogtreecommitdiff
path: root/lisp/newcomment.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2003-05-09 20:09:04 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2003-05-09 20:09:04 +0000
commit019767751124f9de7957e92460b69fdfd22fc317 (patch)
treec27d41a8df398a4ffd3dbbb92311865b43920790 /lisp/newcomment.el
parentdc08a6cbc94839bac6235faae74dc3a6fdbc424f (diff)
downloademacs-019767751124f9de7957e92460b69fdfd22fc317.tar.gz
(comment-indent): Be more careful when inserting
the space, and insert it before setting `begpos'.
Diffstat (limited to 'lisp/newcomment.el')
-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)))