diff options
author | Richard M. Stallman <[email protected]> | 1995-04-11 03:00:04 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 1995-04-11 03:00:04 +0000 |
commit | 012733b38e2eaf7536c7f4381de4e320ae7abd6d (patch) | |
tree | af92e210dc315131ead4e8002bf195cb6c25e7ee /lisp/progmodes | |
parent | bf47de8e06374422c22246bc3f4851882f2dd7ee (diff) |
(perl-comment-indent): Make extra space only when
not at beginning of line.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r-- | lisp/progmodes/perl-mode.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index fd12d9c7b7..d6c9d5802f 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -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 @@ Turning on Perl mode runs the normal hook `perl-mode-hook'." 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. |