[Top][All Lists]

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

Re: Last steps for pretesting (font-lock-extend-region-function)

From: Alan Mackenzie
Subject: Re: Last steps for pretesting (font-lock-extend-region-function)
Date: Tue, 25 Apr 2006 21:15:23 +0000 (GMT)

Good evening, Stefan!

On Tue, 25 Apr 2006, Stefan Monnier wrote:

>> I can't understand at all why you feel that.  I really can't.  To me,
>> f-l-e-r-f seems natural, simple and obvious.  Optionally setting a
>> hook variable to a function is done countless times in Emacs.  I can't
>> see why font-lock-extend-region-function is any more ugly than, say,
>> adaptive-fill-function.

>I'm not saying the hook is a kludge: I'm saying the code that uses it is
>a kludge, compared to the code that uses font-lock-multiline.

OK.  I feel that existing code in AWK Mode is natural.  (OK, I wrote it,
so I'm not in a position to judge it dispassionately, but ...).  It notes
the logical EOL before a change.  It notes the logical EOL after a
change.  The later one is the end position for fontification.

By contrast, the f-l-multiline method (ab)uses the structure for setting
face properties to set region boundaries for possible future changes.

>>> ....much more heavyweight codewise (this is objectively the case in
>>> terms of lines of code, and I hope my comparison above convinces a
>>> few more people that it's also subjectively the case).

>> This is not the case.  We're agreed that, for the f-l-multiline
>> mechanism to work, it needs supplementing by a
>> f-l-extend-region-function hook.

>Yes, it needs such a hook called from font-lock-default-fontify-region.
>Just like your current hook that's called from
>font-lock-after-change-function.  This is orthogonal.


[ .... ]

>        Stefan


reply via email to

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