[Top][All Lists]

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

Re: jit-lock doesn't honor font-lock-lines-before

From: martin rudalics
Subject: Re: jit-lock doesn't honor font-lock-lines-before
Date: Tue, 30 Aug 2005 08:54:13 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

>     (2) Modify `jit-lock-after-change' appropriately by, for example, 
>        (forward-line (- font-lock-lines-before))
>     before
>        (setq start (line-beginning-position))
> That seems like the right fix.  Why do you think it isn't?

Because this means that every time I insert one character, redisplay
would refontify `font-lock-lines-before' in addition to the current
line.  I suppose that the impact of this variable has not been noticed
so far because jit-lock doesn't consider it.

On the other hand, jit-lock wouldn't be able to handle this variable in
the same way as font-lock does: font-lock refontifies immediately in the
after-change hook.  jit-lock's after-change hook would only reset the
fontified property to nil.  Whether and when these lines are refontified
would be _also_ decided by the redisplay engine.  And the latter doesn't
know about `font-lock-lines-before'.  For example, editing the first
line in a window would not "include the line before in refontification".

reply via email to

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