From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juan-Leon Lahoz Garcia Newsgroups: gmane.emacs.devel Subject: Patch to perl-mode (intentation problem) Date: Mon, 3 Jan 2005 12:34:32 -0600 Message-ID: <200501031834.j03IYW61018691@il06exr06.mot.com> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1104777459 24929 80.91.229.6 (3 Jan 2005 18:37:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 3 Jan 2005 18:37:39 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 03 19:37:27 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ClX55-000509-00 for ; Mon, 03 Jan 2005 19:37:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1ClXGF-0000v4-1j for ged-emacs-devel@m.gmane.org; Mon, 03 Jan 2005 13:48:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1ClXG0-0000r3-6y for emacs-devel@gnu.org; Mon, 03 Jan 2005 13:48:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1ClXFy-0000ph-4r for emacs-devel@gnu.org; Mon, 03 Jan 2005 13:48:42 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1ClXFy-0000p6-1V for emacs-devel@gnu.org; Mon, 03 Jan 2005 13:48:42 -0500 Original-Received: from [129.188.136.8] (helo=motgate8.mot.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ClX2J-0006YH-D9 for emacs-devel@gnu.org; Mon, 03 Jan 2005 13:34:35 -0500 Original-Received: from il06exr06.mot.com (il06exr06.mot.com [129.188.137.136]) by motgate8.mot.com (Motorola/Motgate8) with ESMTP id j03IaNfL009067 for ; Mon, 3 Jan 2005 11:36:23 -0700 (MST) Original-Received: from zes06exm01.madrid.ecid.cig.mot.com ([10.161.1.12]) by il06exr06.mot.com (Motorola/il06exr06) with ESMTP id j03IYW61018691 for ; Mon, 3 Jan 2005 12:34:33 -0600 Original-Received: from kaliban.madrid.ecid.cig.mot.com.motorola.com (10.161.14.31 [10.161.14.31]) by zes06exm01.madrid.ecid.cig.mot.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id 4QKC74QP; Mon, 3 Jan 2005 19:34:31 +0100 Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:31753 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:31753 Hi. It seems like perl mode has a small bug when indenting. It does: if ($foo) { aaa::aaa(); bbb::bbb(); } instead of if ($foo) { aaa::aaa(); bbb::bbb(); } perl-mode thinks that aaa::aaa() is a label (only when the X::Y contruct is right after a opening brace) I have tried plain emacs 21.3 and same emacs with latest perl-mode from CVS. Following patch solves the problem for me (both perl-mode versions, the one in 21.3 and the latest). Maybe somebody in this list can review it and apply if is OK. Regards juanleon --- perl-mode.el Tue Dec 28 10:13:50 2004 +++ perl-mode.el.new Tue Dec 28 10:21:40 2004 @@ -769,7 +769,7 @@ (skip-chars-forward " \t\f\n") (cond ((looking-at ";?#") (forward-line 1) t) - ((looking-at "\\(\\w\\|\\s_\\)+:") + ((looking-at "\\(\\w\\|\\s_\\)+:[^:]") (save-excursion (end-of-line) (setq colon-line-end (point)))