From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ilya Zakharevich Newsgroups: gmane.emacs.help Subject: Re: (cperl-mode) Problems with syntax highlighting after __DATA__ ! Date: Wed, 20 Oct 2010 19:40:30 +0000 (UTC) Organization: U.C. Berkeley Math. Department. Message-ID: References: <6dc535d1-ce05-449d-a3ff-d062f5e634d1@z28g2000vba.googlegroups.com> <55f6a9f1-fd98-4069-9bf8-8e3e550f36af@30g2000yqm.googlegroups.com> <5e32a127-1e53-4f9d-899f-6c1329a5b589@i5g2000yqe.googlegroups.com> <70e70be1-3110-4136-97a0-dd8d923591de@28g2000yqm.googlegroups.com> <87wrpeqjkb.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1291872655 21224 80.91.229.12 (9 Dec 2010 05:30:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 05:30:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 06:30:51 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQZ5f-0007PA-Du for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 06:30:51 +0100 Original-Received: from localhost ([127.0.0.1]:34796 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQZ5e-0000Dh-Jz for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 00:30:50 -0500 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Injection-Date: Wed, 20 Oct 2010 19:40:30 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="LlLjF8LevGdIZWbTvv+SXA"; logging-data="23137"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/DLU4TxRYH7aMCoOrhnhqB" User-Agent: slrn/0.9.8.1pl1 (Linux) Cancel-Lock: sha1:z/XeZEQUkf88RF7TUYkmZ2PWq5g= Original-Xref: usenet.stanford.edu gnu.emacs.help:181910 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:76741 Archived-At: On 2010-10-19, Ted Zlatanov wrote: > SM> Yes, of course: short of using multiple major modes (which is something > SM> Emacs doesn't support very well for now), there's not much highlighting > SM> we can do other than assuming Perl syntax. > > I think it's not that bad. __DATA__ is the same content (semantically) > as a here-file, which perl-mode and cperl-mode can handle. Are you sure? I think if one would put the same breaks-CPerl content inside a here-doc, CPerl would slow down as well. AFAIK, here-docs are still facified; the result is just ignored. Hmm, on the other hand, if it is syntaxification which is slowed down, then yes - it should not be a lot of problem to skip stuff after __DATA__, since CPerl does syntaxification in one pass. > It always ends with EOF or with another __X__ marker on a new line. Eh??? AFAIK, it ends with EOF period. (The code to parse may have some special logic to find your __X__; but it may look for whatever it wants as well...) Yours, Ilya