|
From: | Dmitry Gutov |
Subject: | Re: New hook before-region-change-functions wanted |
Date: | Fri, 8 Sep 2017 23:47:51 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Thunderbird/56.0 |
On 9/8/17 5:46 PM, Alan Mackenzie wrote:
While it is true that this hook is not absolutely necessary,
+1
in that the cache switch could be made by the first call to syntax-ppss after the region change, it makes the cache switch clean. In particular, the cache will always be in synch with the region, and any functions which examine the cache at an arbitrary time (for example, jit-lock functions), will get the right cache.
Do we ever want the jit-lock code examining the cache contents directly?
The mechanism will also work a little faster with the new hook than without it, given that changes of restriction are more rarely effected than syntax-ppss is called.
I don't imagine the performance difference will be in any way noticeable. It's just one "if".
[Prev in Thread] | Current Thread | [Next in Thread] |