[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch to perl-mode (intentation problem)
From: |
Juan-Leon Lahoz Garcia |
Subject: |
Patch to perl-mode (intentation problem) |
Date: |
Mon, 3 Jan 2005 12:34:32 -0600 |
Hi.
It seems like perl mode has a small bug when indenting. It does:
if ($foo) {
aaa::aaa();
bbb::bbb();
}
instead of
if ($foo) {
aaa::aaa();
bbb::bbb();
}
perl-mode thinks that aaa::aaa() is a label (only when the X::Y
contruct is right after a opening brace)
I have tried plain emacs 21.3 and same emacs with latest perl-mode
from CVS.
Following patch solves the problem for me (both perl-mode versions,
the one in 21.3 and the latest).
Maybe somebody in this list can review it and apply if is OK.
Regards
juanleon
--- perl-mode.el Tue Dec 28 10:13:50 2004
+++ perl-mode.el.new Tue Dec 28 10:21:40 2004
@@ -769,7 +769,7 @@
(skip-chars-forward " \t\f\n")
(cond ((looking-at ";?#")
(forward-line 1) t)
- ((looking-at "\\(\\w\\|\\s_\\)+:")
+ ((looking-at "\\(\\w\\|\\s_\\)+:[^:]")
(save-excursion
(end-of-line)
(setq colon-line-end (point)))
- Patch to perl-mode (intentation problem),
Juan-Leon Lahoz Garcia <=