emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: font-lock-syntactic-keywords obsolet?


From: Alan Mackenzie
Subject: Re: font-lock-syntactic-keywords obsolet?
Date: Sun, 19 Jun 2016 13:31:43 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

Hello, Dmitry.

On Sun, Jun 19, 2016 at 03:31:23PM +0300, Dmitry Gutov wrote:
> On 06/18/2016 08:12 PM, Alan Mackenzie wrote:

> > CC Mode (in particular C++
> > Mode) does several scans to apply syntax-table text properties, simply
> > because that's a natural thing to do (there being several distinct
> > reasons for these properties being applied).

> How do you avoid having editing operations be O(buffer length)?

Simply because these scans are done on the change region of
before/after-change-functions (as expanded), not on the entire tail of
the buffer.  In CC Mode, all the uses of the syntax-table property are
"local"; a buffer change in an earlier part of the buffer (aside from
crude syntactic things like inserting unclosed comment/string
delimiters) cannot affect the properties on the current part of the
buffer.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]