From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help Subject: What is the _essential_ difference between lazy-lock and jit-lock? Date: Thu, 22 Jan 2004 18:06:33 +0000 Organization: muc.de e.V. -- private internet access Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <9f3pub.9a.ln@acm.acm> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1074796288 6487 80.91.224.253 (22 Jan 2004 18:31:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 22 Jan 2004 18:31:28 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 22 19:31:18 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Ajjbq-0000aK-00 for ; Thu, 22 Jan 2004 19:31:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AjjbO-0000WW-CO for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Jan 2004 13:30:50 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!news2.telebyte.nl!npeer.de.kpn-eurorings.net!news.csl-gmbh.net!informatik.tu-muenchen.de!news.muc.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-NNTP-Posting-Host: acm.muc.de Original-X-Trace: marvin.muc.de 1074795504 80811 193.149.49.134 (22 Jan 2004 18:18:24 GMT) Original-X-Complaints-To: news-admin@muc.de Original-NNTP-Posting-Date: 22 Jan 2004 18:18:24 GMT User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686)) Original-Xref: shelby.stanford.edu gnu.emacs.help:120329 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:16273 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16273 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").