Mercurial > emacs
changeset 11370:d1dc644021a4
(perl-comment-indent): Make extra space only when
not at beginning of line.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 11 Apr 1995 03:00:04 +0000 |
parents | 36b641f83e0c |
children | b945fc51a3b6 |
files | lisp/progmodes/perl-mode.el |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/perl-mode.el Tue Apr 11 01:50:08 1995 +0000 +++ b/lisp/progmodes/perl-mode.el Tue Apr 11 03:00:04 1995 +0000 @@ -3,6 +3,7 @@ ;; Copyright (C) 1990, 1994 Free Software Foundation, Inc. ;; Author: William F. Mann +;; Maintainer: FSF ;; Adapted-By: ESR ;; Keywords: languages @@ -282,8 +283,10 @@ 0 ;Existing comment at bol stays there. (save-excursion (skip-chars-backward " \t") - (max (1+ (current-column)) ;Else indent at comment column - comment-column)))) ; except leave at least one space. + (max (if (bolp) ;Else indent at comment column + 0 ; except leave at least one space if + (1+ (current-column))) ; not at beginning of line. + comment-column)))) (defun electric-perl-terminator (arg) "Insert character and adjust indentation.