From: Dave Love Date: Thu, 13 Feb 2003 15:54:19 +0000 (+0000) Subject: (comment-indent): Ensure space before added comment. X-Git-Tag: ttn-vms-21-2-B4~11211 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e6bba95eca2673a3c01c010d012503c261c4854c;p=emacs.git (comment-indent): Ensure space before added comment. --- diff --git a/lisp/newcomment.el b/lisp/newcomment.el index e108264903c..74d255fabf0 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -473,6 +473,10 @@ If CONTINUE is non-nil, use the `comment-continue' markers if any." ;; 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))) + (insert ?\ )) (insert starter) (setq cpos (point-marker)) (insert ender)))