|
From: | Martin Stjernholm |
Subject: | Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows] |
Date: | Thu, 10 Mar 2005 23:13:51 +0100 |
User-agent: | Gnus/5.090016 (Oort Gnus v0.16) Emacs/20.7 (gnu/linux) |
Stefan Monnier <address@hidden> wrote: > - why can't they use the font-lock-multiline property? > - why can't they use the jit-lock-defer-multiline property? One argument for a hook alternative to these things is that it might not be efficient/convenient to spread text properties all over the place: o Text properties stay behind when the buffer changes, and so they might become invalid. Adding code to correctly remove them before that can be tricky. o Putting text properties in place and handling stickiness etc properly is decidedly more complex than just returning a region from a hook. o Text properties take space and make various buffer operations (slightly) slower. If large quantities of them would be needed they might have noticeable effect on performance. (There are already plenty enough in fontified buffers.) Providing a hook where the font lock pattern writer can extended the region to refontify is imho a very straightforward way to give control over that aspect. I don't contend that the text properties probably are more suitable in many cases, though.
[Prev in Thread] | Current Thread | [Next in Thread] |