From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: merlyn@stonehenge.com (Randal L. Schwartz) Newsgroups: gmane.emacs.devel Subject: Re: cperl mode comments still parsed and colored Date: Sun, 19 Aug 2007 16:57:25 -0700 Message-ID: <86ir7bt6vu.fsf@blue.stonehenge.com> References: <86ps1jv322.fsf@blue.stonehenge.com> <87absn2ikf.fsf@jidanni.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1187567860 20723 80.91.229.12 (19 Aug 2007 23:57:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 19 Aug 2007 23:57:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: jidanni@jidanni.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 20 01:57:37 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IMueC-00053G-HT for ged-emacs-devel@m.gmane.org; Mon, 20 Aug 2007 01:57:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IMueD-0004Yp-GZ for ged-emacs-devel@m.gmane.org; Sun, 19 Aug 2007 19:57:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IMue9-0004X4-Vf for emacs-devel@gnu.org; Sun, 19 Aug 2007 19:57:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IMue9-0004W2-3y for emacs-devel@gnu.org; Sun, 19 Aug 2007 19:57:29 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IMue9-0004Vn-0o for emacs-devel@gnu.org; Sun, 19 Aug 2007 19:57:29 -0400 Original-Received: from blue.stonehenge.com ([209.223.236.162]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IMue7-00086F-6b for emacs-devel@gnu.org; Sun, 19 Aug 2007 19:57:27 -0400 Original-Received: by blue.stonehenge.com (Postfix, from userid 1001) id A70FE1DE336; Sun, 19 Aug 2007 16:57:25 -0700 (PDT) x-mayan-date: Long count = 12.19.14.10.9; tzolkin = 3 Muluc; haab = 17 Yaxkin In-Reply-To: <87absn2ikf.fsf@jidanni.org> (jidanni@jidanni.org's message of "Mon, 20 Aug 2007 07:47:12 +0800") User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (berkeley-unix) X-Detected-Kernel: OpenBSD 3.0-3.9 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: news.gmane.org gmane.emacs.devel:76791 Archived-At: >>>>> "jidanni" == jidanni writes: RLS> You've got gibberish there. jidanni> OK, but you must admit that lines 2 and 3 of this have non-comment jidanni> colors inside comments: jidanni> #-*-cperl-*- jidanni> # ]{2} ]{2} too. jidanni> #\@m And again, not typical Perl code. That's because cperl-mode doesn't promise to be perfect. It actually *can't be*: see my summary of why *no* parser can parse Perl without executing Perl at . Perl cannot be statically lexed. That's incontrovertible. We've all learned to allow cperl-mode to color Perl "mostly ok", knowing it can be tricked by very atypical Perl code, including gibberish. Your stuff is still very atypical character sequences. Stop doing that. Show us a useful Perl program that doesn't get colored right, and I'm sure Ilya will be happy to take a stab at compromising cperl-mode a bit more to make it work again. And even then, most of us have also learned to "give cperl-mode a bone" occasionally to keep it happy. It's definitely a lot better than perl-mode, which required some serious contortions to get right, and why no serious Perl hacker uses perl-mode any more, and why we're happy Ilya crafted cperl-mode to get it "mostly right". Ilya wrote half of the regular expression engine and half the Perl debugger as well, so he's intimately familiar with trying to wrangle text engines to do the right thing. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!