[Top][All Lists]

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

RE: something like linum.el ought to be added

From: brianjiang
Subject: RE: something like linum.el ought to be added
Date: Mon, 17 Sep 2007 13:12:36 +0800

sometimes we can use outline- or hs- and others functions to hide a lot of 
lines.  it seems linum mode create/move overlays for every line between 
window-start and window-end. So even the line is already hide, linum still 
create/move overlay for it. If there are many line hiden within the window, it 
will consume a lot of memory, also impact the performance/efficience of the 
linum mode.  Is it possible to avoid the create linum overly for the invisible 

-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Richard Stallman
Sent: 2007年9月17日 11:59
To: Stefan Monnier
Cc: address@hidden; address@hidden; address@hidden
Subject: Re: something like linum.el ought to be added

    > I think that means we need to add a suitable hook which redisplay can
    > call to inform Lisp code that visibility changes may have altered the
    > position of the bottom of the window.

    OTOH, using jit-lock would make this unnecessary.

jit-lock implements a specific functionality, fontification, and nothing else.

I thought that the hooks used by jit-lock ought to be sufficient for linum as 
well.  But it turns out they are not, because the code to run 
Vfontification_functions checks specifically for the `fontified' property.

We could add another similar hook, or a more general mechanism to implement 
similar hooks for various uses.  But I think that is the wrong way to go, 
because it depends on putting text properties on the text, to indicate which 
parts have been processed.  (Fontified, in the case of jit-lock.)

We don't want linum to put on text properties to say where it has put the line 
numbers.  So I think my idea of using the same hooks jit-lock uses was a 

We seem to have another solution, which I suggested and Markus Triska 

Emacs-devel mailing list

reply via email to

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