emacs-devel
[Top][All Lists]
Advanced

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

Re: emacs-tree-sitter and Emacs


From: Eli Zaretskii
Subject: Re: emacs-tree-sitter and Emacs
Date: Wed, 01 Apr 2020 16:20:24 +0300

> From: Stephen Leake <address@hidden>
> Date: Tue, 31 Mar 2020 16:27:35 -0800
> 
> > OTOH, using an after-change hook has its downsides, even if disregard
> > slow-down (which I wouldn't).
> 
> In wisi (used by ada-mode), the after-change hooks just record what
> regions have been changed; font-lock then triggers a parse if the region
> being fontified contains or is after a change region. Navigation and
> indent also trigger parses.

Can you tell in more detail why you need to rely on these hooks?  They
shouldn't be necessary, AFAIU.  And they cannot pick up every relevant
change; for example, what happens if some face used for font-lock is
modified?

> By default font-lock runs after every character typed

No, it only runs when redisplay kicks in.  If you type very quickly,
it won't run for every character.  At least AFAIR.

> which is often too slow in an ada-mode buffer; I always set
> jit-lock-defer-time to 1.0 seconds.

That's too long to be pleasant on display, IMO.  A second is a very
long time in this context.



reply via email to

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