aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-04-11 03:00:04 +0000
committerRichard M. Stallman1995-04-11 03:00:04 +0000
commit012733b38e2eaf7536c7f4381de4e320ae7abd6d (patch)
treeaf92e210dc315131ead4e8002bf195cb6c25e7ee
parentbf47de8e06374422c22246bc3f4851882f2dd7ee (diff)
downloademacs-012733b38e2eaf7536c7f4381de4e320ae7abd6d.tar.gz
emacs-012733b38e2eaf7536c7f4381de4e320ae7abd6d.zip
(perl-comment-indent): Make extra space only when
not at beginning of line.
-rw-r--r--lisp/progmodes/perl-mode.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index fd12d9c7b77..d6c9d5802f9 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -3,6 +3,7 @@
3;; Copyright (C) 1990, 1994 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1994 Free Software Foundation, Inc.
4 4
5;; Author: William F. Mann 5;; Author: William F. Mann
6;; Maintainer: FSF
6;; Adapted-By: ESR 7;; Adapted-By: ESR
7;; Keywords: languages 8;; Keywords: languages
8 9
@@ -282,8 +283,10 @@ Turning on Perl mode runs the normal hook `perl-mode-hook'."
282 0 ;Existing comment at bol stays there. 283 0 ;Existing comment at bol stays there.
283 (save-excursion 284 (save-excursion
284 (skip-chars-backward " \t") 285 (skip-chars-backward " \t")
285 (max (1+ (current-column)) ;Else indent at comment column 286 (max (if (bolp) ;Else indent at comment column
286 comment-column)))) ; except leave at least one space. 287 0 ; except leave at least one space if
288 (1+ (current-column))) ; not at beginning of line.
289 comment-column))))
287 290
288(defun electric-perl-terminator (arg) 291(defun electric-perl-terminator (arg)
289 "Insert character and adjust indentation. 292 "Insert character and adjust indentation.