emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Re: cc-mode fontification feels random


From: Eli Zaretskii
Subject: Re: [PATCH] Re: cc-mode fontification feels random
Date: Tue, 31 Aug 2021 16:18:22 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz@gnu.org>,  Alan Mackenzie <acm@muc.de>,
>  emacs-devel@gnu.org
> Date: Mon, 30 Aug 2021 16:11:18 -0400
> 
> `jit-lock-stealth-time` defaults to nil (i.e. stealth fontification is
> disabled by default) for a good reason: it used to be enabled.
> 
> The known downsides are:
> - we don't have good input preemption
> - it eats up your battery with no clear benefit
>   [ Because you end up re-fontifying the whole rest of the buffer after
>     every buffer modification.  ]

Regarding the second point: I'd like to put it back into the right
perspective, as someone who has jit-lock-stealth turned on all the
time.

Yes, editing a buffer will trigger stealth fontification.  But:

  . Unless you make jit-lock-stealth-time very small, fontifications
    only kick in if you stop editing, so they are unlikely to be as
    wasteful as it could sound, definitely not "after every buffer
    modification".
  . It is very rare to be editing many buffers at the same time.
    Typically, you edit a couple, and leave the rest alone,
    unmodified.  E.g., my current session has more than 400 buffers,
    and that's not too many by Emacs standards, most of them are
    almost never edited.

The upside, of course, is that my buffers are always fontified, and
scrolling through them is much faster.  And I seldom if ever use
laptops for development.



reply via email to

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