[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 07:45:06 +0000 (GMT)

Hi, Stefan!

On Mon, 24 Apr 2006, Stefan Monnier wrote:

>> I say to you again - your solution is not robust.  I don't think it's
>> been tried at all (correct me if I'm wrong).

>Of course it has, in smerge-mode (since Emacs-21.1) which I use daily, in
>cvs-status (since Emacs-21.1) in perl-mode (since some time in late 2004
>IIRC), in sh-script.el (a bit before perl-mode IIRC), in message.el (where
>it's been buggy at times because I didn't understand that I needed
>a font-lock-default-fontify-region hook).

>They do all suffer from the missing font-lock-default-fontify-region
>hook, just like your code, of course.

>> So - please leave the better tested mechanism in place.

>I don't claim it's buggy or even more buggy than font-lock-multiline.
>It's just an ugly kludge, .....

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,

>....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.  If
we need this hook anyway, why complicate it with f-l-multiline when the
hook works just fine on its own?

>        Stefan


reply via email to

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