the space, and insert it before setting `begpos'.
;; 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)))