emacs-pretest-bug
[Top][All Lists]
Advanced

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

Font-lock repeats itself


From: Daniel Pfeiffer
Subject: Font-lock repeats itself
Date: Mon, 24 Nov 2003 10:59:23 +0100

Hi,

loading the attached file x and evaluating the local variables illustrates my 
point.  Font-locking is then done via a progn form which records the matched 
strings and points in variable x.  F1 v x can then display it nicely.

One would expect font-lock to regexp-pass over the buffer once and thus get a 
plain list from aa - zz, each appearing once.  Instead the whole series appears 
two to three times.  When using jit-lock instead, only some lines get repeated.

This behaviour must be generally inefficient.  It is especially bad for my new 
font-lock based compile/grep:

http://dapfy.bei.t-online.de/compile.el

Error message locations depend on the "Entering directory foobar" message which 
will probably have been fontified further up.  The directory name will have 
been stored in a text property on that message.  Now when I find an error 
message with a relative file name, I'll have to scan back for that directory 
property.

As I assume this to be costly, I want to remember the last location where I 
knew the directory and only scan so far if I am font-locking after that point.  
This optimisation breaks if font-lock is jumping around as I have seen it do.

Note: I don't think a font-lock support mode is compatible with compile, 
because I am dependent on everything before the current line having been 
parsed.  (At least the directory lines, but in practise that means everything.)

In GNU Emacs 21.3.50.7 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2003-11-15 on pfdabpc
configured using `configure  'CFLAGS=-O2 -march=pentium3 -pipe''

coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer

-- 
lerne / learn / apprends / läramå    Esperanto:
                              http://lernu.net/

Attachment: x
Description: Binary data


reply via email to

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