suggested to set `jit-lock-defer-time' to some small fraction to defer
jit-lock fontification a bit. This has an enormous effect for example
when scrolling in large c-mode buffers.
However, most of the time I work with buffers that are rather small and
instant fontification is fast enough. There, deferring font-lock is
somewhat distracting.
So is there a way to enable deferred jit-lock on a per-buffer basis?
In fact, when I execute that command, the variable is buffer-local, and
jit-lock is deferred as it should. But it is actually deferred in *all*
buffers! Even disabling and re-enabling font-lock-mode in a buffer that
doesn't have a buffer-local value of `jit-lock-defer-time' doesn't make
fontification instant again...
> suggested to set `jit-lock-defer-time' to some small fraction to defer
> jit-lock fontification a bit. This has an enormous effect for example
> when scrolling in large c-mode buffers.
> However, most of the time I work with buffers that are rather small and
> instant fontification is fast enough. There, deferring font-lock is
> somewhat distracting.
> So is there a way to enable deferred jit-lock on a per-buffer basis?
Not without rewriting the JIT Lock code, I think. JIT Lock goes over
all of the buffers with the same timers, so any option you customize
will affect all of the buffers.
Eli Zaretskii <e...@gnu.org> writes:
>> So is there a way to enable deferred jit-lock on a per-buffer basis?
> Not without rewriting the JIT Lock code, I think. JIT Lock goes over
> all of the buffers with the same timers, so any option you customize
> will affect all of the buffers.
Right, so why not simply making the timers buffer-local, too? I've
tried that
> suggested to set `jit-lock-defer-time' to some small fraction to defer
> jit-lock fontification a bit. This has an enormous effect for example
> when scrolling in large c-mode buffers.
FWIW, you can argue that it's a bug in the c-mode.