From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: "Font-lock is limited to text matching" is a myth Date: Tue, 11 Aug 2009 13:09:23 -0400 Message-ID: References: <7b501d5c0908091634ndfba631vd9db6502db301097@mail.gmail.com> <200908101335.24002.danc@merrillprint.com> <87my67s8mr.fsf@randomsample.de> <1249942011.29022.15.camel@projectile.siege-engine.com> <1249955428.29022.186.camel@projectile.siege-engine.com> <9c768dc60908102347v57bdf38ara9fe2179f68c07e4@mail.gmail.com> <42D4C5C5-E702-4E30-AB95-A016280F20C7@merrillpress.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250010733 2477 80.91.229.12 (11 Aug 2009 17:12:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Aug 2009 17:12:13 +0000 (UTC) Cc: David Engster , Daniel Colascione , Lennart Borgman , Deniz Dogan , Steve Yegge , emacs-devel@gnu.org, Leo , Miles Bader To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 11 19:12:05 2009 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 1MautI-0004f8-VH for ged-emacs-devel@m.gmane.org; Tue, 11 Aug 2009 19:12:05 +0200 Original-Received: from localhost ([127.0.0.1]:44109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MautH-0005iT-9m for ged-emacs-devel@m.gmane.org; Tue, 11 Aug 2009 13:12:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mauqt-0004fn-6G for emacs-devel@gnu.org; Tue, 11 Aug 2009 13:09:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mauqo-0004dZ-Ex for emacs-devel@gnu.org; Tue, 11 Aug 2009 13:09:34 -0400 Original-Received: from [199.232.76.173] (port=38109 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mauqo-0004dP-1w for emacs-devel@gnu.org; Tue, 11 Aug 2009 13:09:30 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:47463) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mauqk-0004s8-TX; Tue, 11 Aug 2009 13:09:27 -0400 Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n7BH9NGG021012; Tue, 11 Aug 2009 13:09:23 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 28CD83A0D5; Tue, 11 Aug 2009 13:09:23 -0400 (EDT) In-Reply-To: <42D4C5C5-E702-4E30-AB95-A016280F20C7@merrillpress.com> (Daniel Colascione's message of "Tue, 11 Aug 2009 08:13:28 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3338=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:114079 Archived-At: > C preprocessor on Javascript like we do). Rigid parsers with nonterminals > and error productions appear superficially attractive, but using them for > all aspects of a mode not only leads to the issues you discuss below, but > also prevents that mode from being reused for similar languages without the > grammar being re-worked. It's the wrong approach. I've had a fairly long exchange with CEDET's author several years ago, where I made a similar point. I clearly fully agree: indentation should work backward from the indentation point and look at as little of the buffer as possible. This ensures that if some weird thing is going on elsewhere in the buffer, it won't interfere. IOW, the parsing infrastructure (currently limited to syntax-tables and Lisp) should be able to parse backwards. I'm leaning towards operator-precedence-grammars for now. > enough to warrant the terrible backward compatibility problems that would > be generated by a switch to overlays. The problem is performance (and no, it's not intrinsic to overlays, but it's what we have, so until someone revampts the implementation it's what we have to live with). > That other programmers have resigned themselves to inferior > fontification is no argument for Emacs to accept it. Asynchronous > fontification is completely unacceptable for me, and if it were to > become commonplace and unavoidable in Emacs, I would simply stay with > older versions. I partly agree. I imagine that it'd be OK for the fontification to take place in 2 steps: one part on-the-fly and another part with a delay (this other part could be a refinement which could include warnings/error messages, but also updates to other parts of the code). Stefan