[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: C++-mode: Syntax highlighting: wrong color for funct
From: |
Alan Mackenzie |
Subject: |
Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows] |
Date: |
Wed, 15 Feb 2006 19:07:31 +0000 (GMT) |
On Sun, 12 Feb 2006, Stefan Monnier wrote:
>>> This patch to font-lock is exactly the sort of change I was thinking of.
>>> Could someone please install it, then rename
>>> before-font-lock-after-change-function to
>>> font-lock-extend-region-function, and rename
>>> font-lock-run-before-after-change-hook to font-lock-extend-region?
>.... Based on the name, I suppose it's some kind of hook in
>font-lock-after-change-function, in which case I'd be tempted to suggest
>to move it to font-lock-fontify-region instead, to reduce the
>performance impact and make it easier to deal with lazy-lock&jit-lock
>since these tend to use their own after-change-function.
I strongly oppose such a change. With that change:
(i) font-lock-fontify-region would no longer be fontifying the region
specified by its paramters, but a different (possibly larger) one.
(ii) the hook function (which recalculates BEG and END) might well refer
to variables set by a before-change-functions hook. (This is done in AWK
mode, for example). f-l-f-region is regularly called when there is no
buffer change in progress.
Both of these things would make debugging a hook function much more
difficult than it already is. Determining the region to fontify and
actually fontifying it are two logically distinct operations. They
shouldn't be intermingled with eachother.
[ .... ]
> Stefan
--
Alan Mackenzie (Munich, Germany)
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], (continued)
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], Ralf Angeli, 2006/02/14
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], Stefan Monnier, 2006/02/15
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], Ralf Angeli, 2006/02/15
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], Ralf Angeli, 2006/02/15
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], Werner LEMBERG, 2006/02/14
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], Alan Mackenzie, 2006/02/15
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], Stefan Monnier, 2006/02/15
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], Alan Mackenzie, 2006/02/15
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], Kim F. Storm, 2006/02/16
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], Stefan Monnier, 2006/02/16
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows],
Alan Mackenzie <=
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], Ralf Angeli, 2006/02/15
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], Alan Mackenzie, 2006/02/16
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], Ralf Angeli, 2006/02/16
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], Alan Mackenzie, 2006/02/16
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], martin rudalics, 2006/02/17
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], Ralf Angeli, 2006/02/17
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], martin rudalics, 2006/02/17
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], Ralf Angeli, 2006/02/17
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], Stefan Monnier, 2006/02/16
- Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows], Stefan Monnier, 2006/02/15