diff options
| author | Dave Love | 2003-02-13 15:54:19 +0000 |
|---|---|---|
| committer | Dave Love | 2003-02-13 15:54:19 +0000 |
| commit | e6bba95eca2673a3c01c010d012503c261c4854c (patch) | |
| tree | 02f0048f0d694d4ea0138eb2e84aad99063cc0a0 | |
| parent | 136b7da90ab0b90a3e735cb1b980224a0c6b9d41 (diff) | |
| download | emacs-e6bba95eca2673a3c01c010d012503c261c4854c.tar.gz emacs-e6bba95eca2673a3c01c010d012503c261c4854c.zip | |
(comment-indent): Ensure space before added comment.
| -rw-r--r-- | lisp/newcomment.el | 4 |
1 files changed, 4 insertions, 0 deletions
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." | |||
| 473 | ;; are in column 0, so we first go to the likely target column. | 473 | ;; are in column 0, so we first go to the likely target column. |
| 474 | (indent-to comment-column) | 474 | (indent-to comment-column) |
| 475 | (setq begpos (point)) | 475 | (setq begpos (point)) |
| 476 | ;; Ensure there's a space before the comment for things | ||
| 477 | ;; like sh where it matters (as well as being neater). | ||
| 478 | (unless (eq ?\ (char-syntax (char-before))) | ||
| 479 | (insert ?\ )) | ||
| 476 | (insert starter) | 480 | (insert starter) |
| 477 | (setq cpos (point-marker)) | 481 | (setq cpos (point-marker)) |
| 478 | (insert ender))) | 482 | (insert ender))) |