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: Stefan Monnier
Subject: Re: font-lock-syntactic-keywords obsolet?
Date: Sun, 19 Jun 2016 20:06:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

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

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


        Stefan




reply via email to

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