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

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

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


From: Alan Mackenzie
Subject: Re: What is the _essential_ difference between lazy-lock and jit-lock?
Date: Mon, 26 Jan 2004 17:53:46 +0000
User-agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686))

Eli Zaretskii <eliz@elta.co.il> wrote on Sat, 24 Jan 2004 12:41:32 +0200:
>> From: Alan Mackenzie<none@example.invalid>
>> Newsgroups: gnu.emacs.help
>> Date: Fri, 23 Jan 2004 22:34:59 +0000

>> Any chance of a revision number (presumably of jit-lock.el) where this
>> was fixed?

> Sorry, no.  And the changes were not in jit-lock.el per se, IIRC, but
> rather in the font-lock definitions of several modes.

Hmmm.  Font lock definitions are (usually) just data.  It seems a bit
strange to blame data for hanging a program, rather than the program for
not handling the data.  Were you thinking of "ambiguous" regexps, whose
runtime can explode exponentially w.r.t. the length of the string they're
examining?

For the record, the modes I had loaded when I reported the bug in October
2002 were:  C and AWK (both CC Mode 5.28, a released version), Emacs Lisp
(and Lisp Interaction), Info, Diff, Shell Script, and Fundamental.  Since
then, C and AWK font lock settings have been entirely rewritten.  Of the
other modes in this list, were any of them amongst those whose font lock
definitions were rewritten?

[ .... ]

> Instead of wasting effort to invent a tool that will certainly fail in
> a large proportion of cases, Emacs lets you tune the feature with a set
> of settings [for jit-lock-mode].  The documentation of those settings
> should make it clear which ones to use in each particular case.
> Perhaps if you could describe the process that you went through when
> you tried to figure out what options to change, we could identify what
> needs to be improved in the documentation, or perhaps how to change the
> set of the options itself.

It was more that when I found the settings (on the customization page) I
recoiled in horror.  It was a feeling that I could get lost for days if I
wandered into it, possibly that I might really foul something up.  "Just
leave it alone, it seems to work sort-of OK anyhow."  That was what lead
me to suggesting a set of pre-cooked settings.

Again, the fact that there isn't any documentation for the support modes
in the Emacs manual doesn't help.  I'm going to have a go at fixing this.

-- 
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]