[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Font-lock repeats itself
From: |
Daniel Pfeiffer |
Subject: |
Re: Font-lock repeats itself |
Date: |
Mon, 24 Nov 2003 21:15:35 +0100 |
Saluton,
Stefan Monnier <address@hidden> skribis:
> > Note: I don't think a font-lock support mode is compatible with compile,
>
> I'd take it to mean that your `compile' should not use font-lock or should
> use it differently. Especially since `jit-lock' is the default in Emacs-21.
I know. In my compilation-mode font-lock support-modes are currently turned
off.
Rather than patch two different parsers which both have deficiencies
(compilation's are far bigger than font-lock's), emacs should have just one
parser and make that really good. On that hope I am rebasing shaky compile on
font-lock.
> > because I am dependent on everything before the current line having been
> > parsed. (At least the directory lines, but in practise that means
> > everything.)
>
> Font-lock does not give you this guarantee.
As far as I have seen, non-support-mode font-locking doesn't leave any
unfontified gaps, so at least the result is correct. Should even this not be
generally true, I'd have to learn support modes in depth. I'll explore later
what can maybe be done with JIT. The other support-modes don't make sence here.
> PS: I haven't looked at your recipe yet, so I'm not saying there's no
> bug, just that even if there's a bug, the fix will not ensure that
> "everything before point has been parsed".
More an inefficiency than a bug. My worry is just that font-lock wastes
ressources by doing the same text repeatedly even though that text hasn't been
touched in between. Since I get this behaviour in JIT and no support-mode, I
guess it must be font-lock itself that's at fault.
JIT is a good workaround (besides preventing emacs from locking up for seconds
while loading a huge buffer). But JIT can also lock up almost endlessly when
you hit the page-down key repeatedly since it won't scroll before it's
fontified and it won't fontify because there's a pending command... This only
happens with my setup, not emacs -q, but I don't understand why -- have to
explore that too.
coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer
--
lerne / learn / apprends / läramå Esperanto:
http://lernu.net/