bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] cperl-mode 5.22 indentation fix


From: Stanislaw Halik
Subject: [patch] cperl-mode 5.22 indentation fix
Date: Wed, 27 Jun 2007 06:49:43 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Heya,

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.

I already tried latest cperl-mode 5.23 which fixes the bug, but font
lock is horribly broken in that version.

The patch follows:

--- -   2007-06-27 06:48:26.204236147 +0200
+++ cperl-mode.el       2007-06-27 06:48:01.000000000 +0200
@@ -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]+\\)[^ a-zA-Z_\t\n#]")
            (progn
              (forward-word 1)
              (delete-horizontal-space)

It doesn't appear to break anything.

TIA,
/sh

-- 
  /\    
   /   Unix stuff      :: http://tehran.lain.pl
 \ \/  Yet Another RBL :: http://rbl.lain.pl
\/\    Web hosting     :: http://insane.pl




reply via email to

[Prev in Thread] Current Thread [Next in Thread]