# HG changeset patch # User Dave Love # Date 1045151659 0 # Node ID ffe55e61c3fc2226721263e7ca5ec494a119458d # Parent 4a50d348a2b1a84409f3be9def2d2bbeb353e117 (comment-indent): Ensure space before added comment. diff -r 4a50d348a2b1 -r ffe55e61c3fc lisp/newcomment.el --- a/lisp/newcomment.el Thu Feb 13 13:15:45 2003 +0000 +++ b/lisp/newcomment.el Thu Feb 13 15:54:19 2003 +0000 @@ -473,6 +473,10 @@ ;; 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)))