[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: [patch] cperl-mode 5.22 indentation fix]
From: |
Stefan Monnier |
Subject: |
Re: address@hidden: [patch] cperl-mode 5.22 indentation fix] |
Date: |
Thu, 28 Jun 2007 11:17:19 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
> I'm using the emacs-unicode-2 branch with cperl-mode 5.22. However,
> reindenting `foreach_foo()' changes it to `foreach _foo()' which is far
> from desirable.
> (if (looking-at
> - - "[ \t]*}?[
> \t]*\\<\\(\\els\\(e\\|if\\)\\|continue\\|unless\\|if\\|while\\|for\\(each\\)?\\|until\\)\\>\\(\t*\\|[
> \t][ \t]+\\)[^ \t\n#]")
> + "[ \t]*}?[
> \t]*\\<\\(\\els\\(e\\|if\\)\\|continue\\|unless\\|if\\|while\\|for\\(each\\)?\\|until\\)\\>\\(\t*\\|[
> \t][ \t]+\\)[^ a-zA-Z_\t\n#]")
> (progn
> (forward-word 1)
> (delete-horizontal-space)
> It doesn't appear to break anything.
Does the patch below fix it as well?
It looks like there are many places in cperl-mode.el which might potentially
suffer from similar problems.
Stefan
--- cperl-mode.el 20 avr 2007 14:19:45 -0400 1.89
+++ cperl-mode.el 28 jun 2007 11:15:03 -0400
@@ -5178,7 +5178,7 @@
;; Looking at:
;; else {
(if (looking-at
- "[ \t]*}?[
\t]*\\<\\(\\els\\(e\\|if\\)\\|continue\\|unless\\|if\\|while\\|for\\(each\\)?\\|until\\)\\>\\(\t*\\|[
\t][ \t]+\\)[^ \t\n#]")
+ "[ \t]*}?[
\t]*\\<\\(\\els\\(e\\|if\\)\\|continue\\|unless\\|if\\|while\\|for\\(each\\)?\\|until\\)\\_>\\(\t*\\|[
\t][ \t]+\\)[^ \t\n#]")
(progn
(forward-word 1)
(delete-horizontal-space)