unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [sthalik@tehran.lain.pl: [patch] cperl-mode 5.22 indentation fix]
@ 2007-06-27 23:42 Richard Stallman
  2007-06-28 15:17 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Stallman @ 2007-06-27 23:42 UTC (permalink / raw)
  To: emacs-devel

Would someone please DTRT and ack?

------- Start of forwarded message -------
X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY 
	autolearn=failed version=3.1.0
Date: Wed, 27 Jun 2007 06:49:43 +0200
From: Stanislaw Halik <sthalik@tehran.lain.pl>
To: bug-gnu-emacs@gnu.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Subject: [patch] cperl-mode 5.22 indentation fix

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


_______________________________________________
bug-gnu-emacs mailing list
bug-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs
------- End of forwarded message -------

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [sthalik@tehran.lain.pl: [patch] cperl-mode 5.22 indentation fix]
  2007-06-27 23:42 [sthalik@tehran.lain.pl: [patch] cperl-mode 5.22 indentation fix] Richard Stallman
@ 2007-06-28 15:17 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2007-06-28 15:17 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

> 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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-28 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-27 23:42 [sthalik@tehran.lain.pl: [patch] cperl-mode 5.22 indentation fix] Richard Stallman
2007-06-28 15:17 ` Stefan Monnier

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).