[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: |
Stefan Monnier |
Subject: |
Re: Last steps for pretesting (font-lock-extend-region-function) |
Date: |
Tue, 25 Apr 2006 08:12:50 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
>> 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,
> 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.
>> ....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.
> If we need this hook anyway, why complicate it with f-l-multiline when the
> hook works just fine on its own?
There are two alternatives when writing your code in cc-mode:
- use a hook in f-l-d-f-r + font-lock-multiline.
The font-lock-multiline part of the code is a couple lines added to
font-lock-keywords.
- use a hook in f-l-d-f-r + a hook in f-l-a-c-f + a hook in b-c-f.
The *-change-function part of the code is a good bit more than
a couple lines.
In which way does font-lock-multiline complicate "it"?
Stefan
- Re: Last steps for pretesting (font-lock-extend-region-function), (continued)
- Re: Last steps for pretesting (font-lock-extend-region-function), David Kastrup, 2006/04/25
- Re: Last steps for pretesting (font-lock-extend-region-function), Stefan Monnier, 2006/04/25
- Re: Last steps for pretesting (font-lock-extend-region-function), Alan Mackenzie, 2006/04/25
- Re: Last steps for pretesting (font-lock-extend-region-function), Stefan Monnier, 2006/04/25
- Re: Last steps for pretesting (font-lock-extend-region-function), Stefan Monnier, 2006/04/25
- Re: Last steps for pretesting (font-lock-extend-region-function), Alan Mackenzie, 2006/04/25
- Re: Last steps for pretesting (font-lock-extend-region-function), Alan Mackenzie, 2006/04/25
- Re: Last steps for pretesting (font-lock-extend-region-function), Stefan Monnier, 2006/04/26
- Re: Last steps for pretesting (font-lock-extend-region-function), Stefan Monnier, 2006/04/24
- Re: Last steps for pretesting (font-lock-extend-region-function), Alan Mackenzie, 2006/04/25
- Re: Last steps for pretesting (font-lock-extend-region-function),
Stefan Monnier <=
- Re: Last steps for pretesting (font-lock-extend-region-function), Alan Mackenzie, 2006/04/25
- Re: Last steps for pretesting (font-lock-extend-region-function), Stefan Monnier, 2006/04/26
- Re: Last steps for pretesting (font-lock-extend-region-function), Alan Mackenzie, 2006/04/26
- Re: Last steps for pretesting (font-lock-extend-region-function), Stefan Monnier, 2006/04/26
- Re: Last steps for pretesting (font-lock-extend-region-function), Stefan Monnier, 2006/04/24
- Re: Last steps for pretesting (font-lock-extend-region-function), Alan Mackenzie, 2006/04/25
- Re: Last steps for pretesting (font-lock-extend-region-function), Stefan Monnier, 2006/04/25
- Re: Last steps for pretesting (font-lock-extend-region-function), Alan Mackenzie, 2006/04/25
- Re: Last steps for pretesting (font-lock-extend-region-function), Miles Bader, 2006/04/25
- Re: Last steps for pretesting (font-lock-extend-region-function), Tomas Zerolo, 2006/04/25