emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: C++-mode: Syntax highlighting: wrong color for funct


From: Ralf Angeli
Subject: Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows]
Date: Wed, 15 Mar 2006 10:02:51 +0100

* Stefan Monnier (2006-03-14) writes:

> Also, I thought we had agreed that this new feature should be in
> f-l-default-fontify-region rather than f-l-after-change-function.  I believe
> it is *wrong* for it to be in f-l-after-change-function where it is mostly
> useless:

I think so, too.

> you can already get the same result by using an
> (non-f-l)after-change-functions hook that sets the
> font-lock-multiline property.

BTW, I am currently extending the region without a hook or an advice
by calculating the start of the (possibly extended) region to be
fontified in a custom function plugged into font lock via
`font-lock-fontify-region-function' which calls
`font-lock-default-fontify-region' with the adapted region start.

For that to work correctly I also had to adapt
`jit-lock-context-unfontify-pos' in the custom function as suggested
by you earlier.  Otherwise the part of the region before the line
where a change happened won't get refontified correctly.  That means
it will only be refontified upon redisplay (I guess), e.g. if one
enters the minibuffer with `M-x'.  So I wonder if a hook in
`font-lock-default-fontify-region' might have to cater for that as
well.

-- 
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]