[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: |
Wed, 26 Apr 2006 07:44:11 +0000 (GMT) |
Hi, Stefan~
On Wed, 26 Apr 2006, Stefan Monnier wrote:
>> Would this not be very inconvenient? Somebody needing the extend-region
>> functionality in f-l-d-f-r would then have to copy the entire source of
>> the default function, amend the source, make the
>> f-l-fontify-region-funtion buffer local, then set it.
>Of course not, just use a function like
> (defun c-awk-font-lock-fontify-region (beg end &rest args)
> (apply 'font-lock-default-fontify-region
> (c-awk-beginning-of-logical-line beg)
> (c-awk-end-of-logical-line end)
> args))
Heh! Thanks, I should have spotted that myself!
That wouldn't work in the general case, though, because the current
implementation of f-l-d-f-r would foul up the BEG and END parameters
unless they happen to be at line boundaries. This is another reason for
the refactoring I've been suggesting, to extract a core function from
f-l-d-f-r which fontifies exactly the region it's given.
>-- Stefan
--
Alan.
- Re: Last steps for pretesting (font-lock-extend-region-function), (continued)
- 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
- Re: Last steps for pretesting (font-lock-extend-region-function), Ralf Angeli, 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), Ralf Angeli, 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), Ralf Angeli, 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/26
- Re: Last steps for pretesting (font-lock-extend-region-function),
Alan Mackenzie <=
- 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), Drew Adams, 2006/04/21
Re: Last steps for pretesting, Richard Stallman, 2006/04/19
Re: Last steps for pretesting, Richard Stallman, 2006/04/24
Re: Last steps for pretesting, Reiner Steib, 2006/04/20
Re: Last steps for pretesting, Ramprasad B, 2006/04/20