unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stanislaw Halik <sthalik@tehran.lain.pl>
To: bug-gnu-emacs@gnu.org
Subject: [patch] cperl-mode 5.22 indentation fix
Date: Wed, 27 Jun 2007 06:49:43 +0200	[thread overview]
Message-ID: <20070627044943.GA11464@tehran.lain.pl> (raw)

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	other threads:[~2007-06-27  4:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070627044943.GA11464@tehran.lain.pl \
    --to=sthalik@tehran.lain.pl \
    --cc=bug-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).