From unknown Sun Jun 15 08:37:08 2025 X-Loop: don@donarmstrong.com Subject: bug#348: perl mode color vs. /:/ Reply-To: jidanni@jidanni.org, 348@debbugs.gnu.org Resent-From: jidanni@jidanni.org Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 01 Jun 2008 23:15:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 348 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12123615334563 (code B ref -1); Sun, 01 Jun 2008 23:15:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.7 required=4.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 1 Jun 2008 23:05:33 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m51N5R5w004557 for ; Sun, 1 Jun 2008 16:05:30 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K2wcB-0001As-2J for bug-gnu-emacs@gnu.org; Sun, 01 Jun 2008 19:05:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K2wc9-0001Ab-Bm for bug-gnu-emacs@gnu.org; Sun, 01 Jun 2008 19:05:25 -0400 Received: from [199.232.76.173] (port=48487 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K2wc9-0001AY-5z for bug-gnu-emacs@gnu.org; Sun, 01 Jun 2008 19:05:25 -0400 Received: from lax-green-bigip-5.dreamhost.com ([208.113.200.5]:44865 helo=blingymail-a3.g.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K2wc8-0004UQ-Tr for bug-gnu-emacs@gnu.org; Sun, 01 Jun 2008 19:05:25 -0400 Received: from jidanni2.jidanni.org (122-127-34-79.dynamic.hinet.net [122.127.34.79]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by blingymail-a3.g.dreamhost.com (Postfix) with ESMTP id 42D3F14D73A for ; Sun, 1 Jun 2008 16:05:22 -0700 (PDT) To: bug-gnu-emacs@gnu.org From: jidanni@jidanni.org Date: Mon, 02 Jun 2008 04:47:28 +0800 Message-ID: <87bq2kkhlr.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 Perl mode needs an "m" here to get the colors right. Cperl mode has no problem. emacs-version "22.2.1". $ cat r.pl m/.*:dndli([^:]+)10:/; my $tmp=$1; #color OK /.*:dndli([^:]+)10:/; my $tmp=$1; #color stuck. //;#to recover color, only to demonstrate that for(split /:/){print; print "\n";} #color stuck again. #By the way, add make the "OK" in the comment above become "OK." and #color gets unstuck! $ emacs -Q r.pl From unknown Sun Jun 15 08:37:08 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: jidanni@jidanni.org Subject: bug#348 closed by Stefan Monnier (Re: bug#348: perl mode color vs. /:/) Message-ID: References: <87bq2kkhlr.fsf@jidanni.org> X-Emacs-PR-Message: they-closed 348 X-Emacs-PR-Package: emacs Reply-To: 348@debbugs.gnu.org Content-Type: multipart/mixed; boundary="----------=_1212477906-27300-1" This is a multi-part message in MIME format... ------------=_1212477906-27300-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #348: perl mode color vs. /:/ It has been closed by Stefan Monnier . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Stefan Monnier by replying to this email. --=20 348: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D348 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1212477906-27300-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From monnier@iro.umontreal.ca Tue Jun 3 00:19:58 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER,HELO_LH_HOME,MURPHY_DRUGS_REL8,RCVD_IN_SORBS_DUL,RDNS_DYNAMIC autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 348-close) by emacsbugs.donarmstrong.com; 3 Jun 2008 07:19:58 +0000 Received: from ceviche.home (206-248-132-168.dsl.teksavvy.com [206.248.132.168]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m537Js0V026080 for <348-close@emacsbugs.donarmstrong.com>; Tue, 3 Jun 2008 00:19:55 -0700 Received: by ceviche.home (Postfix, from userid 20848) id CACF2B423C; Tue, 3 Jun 2008 03:19:53 -0400 (EDT) From: Stefan Monnier To: 348-close@debbugs.gnu.org Subject: Re: bug#348: perl mode color vs. /:/ Message-ID: References: <87bq2kkhlr.fsf@jidanni.org> Date: Tue, 03 Jun 2008 03:19:53 -0400 In-Reply-To: <87bq2kkhlr.fsf@jidanni.org> (jidanni@jidanni.org's message of "Mon, 02 Jun 2008 04:47:28 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >>>>> "jidanni" == jidanni writes: > Perl mode needs an "m" here to get the colors right. > Cperl mode has no problem. emacs-version "22.2.1". > $ cat r.pl > m/.*:dndli([^:]+)10:/; my $tmp=$1; #color OK > /.*:dndli([^:]+)10:/; my $tmp=$1; #color stuck. > //;#to recover color, only to demonstrate that > for(split /:/){print; print "\n";} #color stuck again. > #By the way, add make the "OK" in the comment above become "OK." and > #color gets unstuck! > $ emacs -Q r.pl Thanks. I've installed the patch below which seems to fix your examples. Hopefully it doesn't make things worse in too many other circumstances. Stefan Index: lisp/progmodes/perl-mode.el =================================================================== RCS file: /sources/emacs/emacs/lisp/progmodes/perl-mode.el,v retrieving revision 1.78 diff -u -r1.78 perl-mode.el --- lisp/progmodes/perl-mode.el 6 May 2008 07:18:35 -0000 1.78 +++ lisp/progmodes/perl-mode.el 3 Jun 2008 07:18:03 -0000 @@ -252,7 +252,7 @@ ;; (defvar perl-font-lock-syntactic-keywords ;; TODO: here-documents ("<<\\(\\sw\\|['\"]\\)") - '(;; Turn POD into b-style comments + `(;; Turn POD into b-style comments ("^\\(=\\)\\sw" (1 "< b")) ("^=cut[ \t]*\\(\n\\)" (1 "> b")) ;; Catch ${ so that ${var} doesn't screw up indentation. @@ -267,12 +267,27 @@ ;; Be careful not to match "sub { (...) ... }". ("\\From jidanni@jidanni.org Sun Jun 1 16:05:33 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.7 required=4.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 1 Jun 2008 23:05:33 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m51N5R5w004557 for ; Sun, 1 Jun 2008 16:05:30 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K2wcB-0001As-2J for bug-gnu-emacs@gnu.org; Sun, 01 Jun 2008 19:05:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K2wc9-0001Ab-Bm for bug-gnu-emacs@gnu.org; Sun, 01 Jun 2008 19:05:25 -0400 Received: from [199.232.76.173] (port=48487 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K2wc9-0001AY-5z for bug-gnu-emacs@gnu.org; Sun, 01 Jun 2008 19:05:25 -0400 Received: from lax-green-bigip-5.dreamhost.com ([208.113.200.5]:44865 helo=blingymail-a3.g.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K2wc8-0004UQ-Tr for bug-gnu-emacs@gnu.org; Sun, 01 Jun 2008 19:05:25 -0400 Received: from jidanni2.jidanni.org (122-127-34-79.dynamic.hinet.net [122.127.34.79]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by blingymail-a3.g.dreamhost.com (Postfix) with ESMTP id 42D3F14D73A for ; Sun, 1 Jun 2008 16:05:22 -0700 (PDT) To: bug-gnu-emacs@gnu.org Subject: perl mode color vs. /:/ From: jidanni@jidanni.org Date: Mon, 02 Jun 2008 04:47:28 +0800 Message-ID: <87bq2kkhlr.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 Perl mode needs an "m" here to get the colors right. Cperl mode has no problem. emacs-version "22.2.1". $ cat r.pl m/.*:dndli([^:]+)10:/; my $tmp=$1; #color OK /.*:dndli([^:]+)10:/; my $tmp=$1; #color stuck. //;#to recover color, only to demonstrate that for(split /:/){print; print "\n";} #color stuck again. #By the way, add make the "OK" in the comment above become "OK." and #color gets unstuck! $ emacs -Q r.pl ------------=_1212477906-27300-1--