[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: martin rudalics
Subject: Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows]
Date: Thu, 16 Feb 2006 09:56:45 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> There's the macro combine-after-change-calls to mitigate this.


> Surely it would be possible to arrange for this searching to be done only
> when one of these delimiters is inserted or deleted?
> In a before-change function, you check whether or not a change is

`combine-after-change-calls' won't combine anything when
`before-change-functions' is non-nil.

> happening around a ">>", ">", "<" or "<<", and record this in some
> variables.  In the after-change you see if a delimiter has actually been
> inserted or deleted.  Only then need you search.  Since this searching
> will be done only rarely, you probably don't need to worry about
> searching even the entire buffer.

When you fill text you would have to (1) scan every line for occurrences
of these strings in `before-change-functions' and record these
occurrences somehow (maybe using markers), (2) apply the change for that
line, and (3) scan the line again for matching occurrences of these
strings in `after-change-functions' (and maybe release the markers).
All this in the presence of some LaTeX syntax specific math context
whose bounds you have to recalculate for every single change too.  And,
what's worse, all this is completely useless since filling shouldn't
affect fontification anyway.

reply via email to

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