# HG changeset patch # User Stefan Monnier # Date 999379397 0 # Node ID fc69197cb76dbac3a62f589f8cd49d494b42a33a # Parent 8aea6fefc072226d8934af426876be02e6a6e85a (comment-indent): Don't insert a fixed number of spaces. diff -r 8aea6fefc072 -r fc69197cb76d lisp/newcomment.el --- a/lisp/newcomment.el Sat Sep 01 21:19:45 2001 +0000 +++ b/lisp/newcomment.el Sat Sep 01 21:23:17 2001 +0000 @@ -5,7 +5,7 @@ ;; Author: code extracted from Emacs-20's simple.el ;; Maintainer: Stefan Monnier ;; Keywords: comment uncomment -;; Revision: $Id: newcomment.el,v 1.32 2001/08/21 18:30:59 monnier Exp $ +;; Revision: $Id: newcomment.el,v 1.33 2001/09/01 21:19:45 monnier Exp $ ;; This file is part of GNU Emacs. @@ -446,10 +446,8 @@ ;; 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. The check for (zerop comment-column) is used for cases - ;; where we're called from comment-indent-new-line. - (unless (zerop comment-column) (insert " ")) + ;; are in column 0, so we first go to the likely target column. + (indent-to comment-column) (setq begpos (point)) (insert starter) (setq cpos (point-marker))