[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 15:23:56 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
>> I was talking about programmer work, and I've shown you the code for
>> font-lock-multiline: it's quite a bit shorter and more straightforward
>> than your hack using b-c-f and a-c-f: just match the multiline element,
>> place a font-lock-multiline property on it, and you're set.
> Do you even have to bother with placing font-lock-multiline properties
> manually? In AUCTeX we simply set the font-lock-multiline variable to
> t and font-lock added the property automatically.
Of course, you can indeed just set the variable, but this has more impact on
performance (e.g. every time it matches a keyword, font-lock will then check
whether it spans several lines, even if the keyword pattern is something
silly like "foo" which clearly can't span multiple lines), and will not
always work correctly if the MATCHER was a function rather than a regexp.
I suggested to do it manually because it is more explicit, it gives you
more control, and most importantly I haven't seen the part of
c-awk-font-lock-keywords which cares about multiple lines, so I haven't
convinced myself that it would work for his example.
Stefan
- Re: Last steps for pretesting (font-lock-extend-region-function), (continued)
- 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), Ralf Angeli, 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), Ralf Angeli, 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), Ralf Angeli, 2006/04/26
- Re: Last steps for pretesting (font-lock-extend-region-function), Stefan Monnier, 2006/04/25
- font-lock-multiline for cc-awk., Stefan Monnier, 2006/04/25
- Re: font-lock-multiline for cc-awk., Alan Mackenzie, 2006/04/26
- Re: font-lock-multiline for cc-awk., Stefan Monnier, 2006/04/26
- Re: Last steps for pretesting (font-lock-extend-region-function),
Stefan Monnier <=
- 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), 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