[Top][All Lists]

[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 14:59:34 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

Hello, Dmitry.

On Sun, Jun 19, 2016 at 04:48:05PM +0300, Dmitry Gutov wrote:
> On 06/19/2016 04:31 PM, Alan Mackenzie wrote:

> > 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.

> So if I remove a closing brace somewhere near the beginning of the 
> buffer, it still can't affect text properties near the end?

No, it can't.  If you remove (from a C++ buffer) a terminating template
delimiter (">"), that will have the effect of removing the syntax-table
text property from its former matching opener ("<").

> If so, what if I remove a closing double-quote instead?

Good question.  I put printf's (in effect) into the three routines which
can expand the scanning region in the after-change-function, and
removing a closing double-quote doesn't cause that region to be expanded
beyond the current line.

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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