help-gnu-emacs
[Top][All Lists]
Advanced

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

What is the _essential_ difference between lazy-lock and jit-lock?


From: Alan Mackenzie
Subject: What is the _essential_ difference between lazy-lock and jit-lock?
Date: Thu, 22 Jan 2004 18:06:33 +0000
User-agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686))

lazy-lock and jit-lock are both font-lock support modes, things which
reduce irritating delays when files are fontified as they are visited and
(to a lesser extent) as they get edited.

However, they both appear to offer the same essential facilities:  lazy
fontification (only the currently displayed part of the buffer is
fontified with any urgency), stealth fontification (undisplayed parts get
fontified whilst the user isn't typing), deferred fontification (whilst
typing, keypresses are given priority over instant fontification).  

jit-lock was written some years after lazy-lock, and its defaults are
different (for example, by default jit-lock starts stealth fontification
after 3 seconds inactivity, lazy-lock after 30 seconds).

[lazy-lock and jit-lock thus stand in sharp contrast to fast-lock, which
merely writes the current fontifications to an auxiliary file so as to
speed up fontification the next time the main file is loaded.]

Question:  Why jit-lock?  What does jit-lock offer that lazy-lock
doesn't?  Why was jit-lock written in the first place?  What was
unsatisfactory about lazy-lock?

I've tried reading the info pages (there seems to be no information on
these support modes) and I've been reading the modes' lisp source files.
Unfortunately, I get lost in the implementation details without seeing
the essentials.

Why jit-lock?

Thanks in advance!

-- 
Alan Mackenzie (Munich, Germany)
Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").



reply via email to

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