# HG changeset patch # User Richard M. Stallman # Date 797569204 0 # Node ID d1dc644021a40d7e81fc80c306fe6cb598a001f0 # Parent 36b641f83e0c23d53d47522575d1c79ee9eae9a2 (perl-comment-indent): Make extra space only when not at beginning of line. diff -r 36b641f83e0c -r d1dc644021a4 lisp/progmodes/perl-mode.el --- 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.