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: Mon, 20 Jun 2016 11:03:32 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

Hello, Stefan.

On Sun, Jun 19, 2016 at 08:06:25PM -0400, Stefan Monnier wrote:
> > With a syntax-propertize-function instead of the current
> > before/after-change-functions, I simply can't picture what would happen.

> I'll help you.

> > The syntax-table properties would get removed from B, C, and D at some
> > indeterminate time.

> Indeed (tho I could tell you exactly when, but the abstraction provided
> by syntax-* doesn't depend on that).
> But right when you do the buffer modification, the text after the change
> is immediately marked as "out-of-date".

What about the text _before_ the change, should that become out of date
(as it does in CC Mode)?

> > You'd then have a race condition as to whether D
> > would match or mismatch some indeterminate character before A.

> No: as soon as you need to look at the `syntax-table' property, the
> parts marked as "out of date" will have their outdated properties
> removed+reapplied, so you'll be sure to get uptodate properties at that
> time.

This sounds like black magic.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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