From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stanislaw Halik Newsgroups: gmane.emacs.bugs Subject: [patch] cperl-mode 5.22 indentation fix Date: Wed, 27 Jun 2007 06:49:43 +0200 Message-ID: <20070627044943.GA11464@tehran.lain.pl> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1182930105 12359 80.91.229.12 (27 Jun 2007 07:41:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Jun 2007 07:41:45 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 27 09:41:42 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I3S9m-0006SX-5q for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jun 2007 09:41:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I3S9l-0005KO-Mq for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jun 2007 03:41:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I3QEC-0007tN-8f for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2007 01:38:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I3QEA-0007sw-Ez for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2007 01:38:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I3QEA-0007ss-8d for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2007 01:38:06 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1I3QE9-0003Ue-UG for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2007 01:38:06 -0400 Original-Received: from ananke.insane.pl ([88.198.47.232]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I3PTc-0004ZP-81 for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2007 00:50:00 -0400 Original-Received: from c146-249.icpnet.pl ([85.221.146.249] helo=enkidu.local ident=Debian-exim) from Debian-exim by ananke.insane.pl with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (envelope-from ) id 1I3PVE-0007MT-QJ for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2007 06:51:41 +0200 Original-Received: from sthalik by enkidu.local with local (Exim 4.63) (envelope-from ) id 1I3PTM-000301-Et for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2007 06:49:44 +0200 Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) X-User: sthalik X-detected-kernel: Linux 2.6 (newer, 1) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Wed, 27 Jun 2007 03:40:57 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16006 Archived-At: 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