[Top][All Lists]

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

Re: Syntax-ppss flush should happen in after-change hook

From: Vitalie Spinu
Subject: Re: Syntax-ppss flush should happen in after-change hook
Date: Sat, 16 Mar 2019 20:56:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> On Sat, Mar 16 2019 14:09, Stefan Monnier wrote:

> I'd much rather "do it right" and change add-hook to understand a notion of
> depth/priority/order.

Interesting. This would be useful for this particular case, but are there other
use cases that would benefit from it?

>> Combine-change-calls happened in my example, but currently any buffer
>> change results in inconsistent syntax state.

> Then I must have misunderstood something.
> Can you give more details about the problem scenario you have in mind?

Sorry, I didn't put it rightly. I meant all those functions that trigger
"syntax-propertize", but looks like I was actually confused about the number of
such functions.

> It's only when you start using combine-change-calls (or
> combine-after-change-calls) that the code the performs the change
> between a-c-f and b-c-f can run arbitrarly fancy Elisp code.

I see. Then, as long as combine-change-calls leaves the correct state everything
should be fine. Then your patch looks right, indeed. It does fix my
markdown-mode example for sure.


reply via email to

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