changeset 39078:8aea6fefc072

*** empty log message ***
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 01 Sep 2001 21:19:45 +0000
parents b0080041c3c5
children fc69197cb76d
files lisp/newcomment.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/newcomment.el	Sat Sep 01 18:22:38 2001 +0000
+++ b/lisp/newcomment.el	Sat Sep 01 21:19:45 2001 +0000
@@ -5,7 +5,7 @@
 ;; Author: code extracted from Emacs-20's simple.el
 ;; Maintainer: Stefan Monnier <monnier@cs.yale.edu>
 ;; Keywords: comment uncomment
-;; Revision: $Id: newcomment.el,v 1.31 2001/03/02 20:31:40 monnier Exp $
+;; Revision: $Id: newcomment.el,v 1.32 2001/08/21 18:30:59 monnier Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -446,8 +446,10 @@
 	  ;; If none, insert one.
 	  (save-excursion
 	    ;; Some comment-indent-function insist on not moving comments that
-	    ;; are in column 0, so we insert a space to avoid this special case
-	    (insert " ")
+	    ;; are in column 0, so we insert a space to avoid this special
+	    ;; case.  The check for (zerop comment-column) is used for cases
+	    ;; where we're called from comment-indent-new-line.
+	    (unless (zerop comment-column) (insert " "))
 	    (setq begpos (point))
 	    (insert starter)
 	    (setq cpos (point-marker))