recently this blog post
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
So is there a way to enable deferred jit-lock on a per-buffer basis?
I tried this:
(defun th-jit-lock-defer-fontification ()
(set (make-local-variable 'jit-lock-defer-time) 0.1)
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...