* Patch to perl-mode (intentation problem)
@ 2005-01-03 18:34 Juan-Leon Lahoz Garcia
2005-01-03 20:46 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Juan-Leon Lahoz Garcia @ 2005-01-03 18:34 UTC (permalink / raw)
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)))
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Patch to perl-mode (intentation problem)
2005-01-03 18:34 Patch to perl-mode (intentation problem) Juan-Leon Lahoz Garcia
@ 2005-01-03 20:46 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2005-01-03 20:46 UTC (permalink / raw)
Cc: emacs-devel
> 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)
Thank you. It should be fixed now,
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-01-03 20:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-03 18:34 Patch to perl-mode (intentation problem) Juan-Leon Lahoz Garcia
2005-01-03 20:46 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.