emacs-devel
[Top][All Lists]
Advanced

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

Re: How to add pseudo vector types


From: Clément Pit-Claudel
Subject: Re: How to add pseudo vector types
Date: Tue, 20 Jul 2021 14:04:25 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 7/20/21 12:32 PM, Stephen Leake wrote:
> Computing fontification and indentation must be synchronous.

Must?  What makes you say that?

> Except that the results will not be useful, since they won't apply to
the original buffer if it is changed.

Then you will send the additional changes and wait.
TS is an incremental parser, so the work it will have done incorporating part 
of the changes will not be wasted.

Concrete example: if you have a bit of elisp that runs for .5s to make 
modifications to the buffer, then press "indent", and only then do you send 
changes to TS and wait for the response synchronously, then you will wait for 
.5s + time to incorporate all changes.  If you start processing the changes in 
parallel as they are made by the Elisp code, then you will only wait for .5s + 
time to incorporate only the changes that had not been processed yet.



reply via email to

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