[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: Wed, 15 Feb 2006 15:20:40 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

>>In particular the hook might trigger fontification for regions that are
>>not displayed thus defeating the purpose of jit-lock.
> What alternative is there if fontification of a visible portion of the
> buffer depends on text not being displayed?

Fontifying text that does not reside near the beginning of a buffer
usually always depends on analyzing the syntax of text that is not
displayed.  In fact, fontification must work independently of whether
text is displayed or not.  That's, for example, the driving principle of
stealth fontification.  However, fontification of some region A of a
buffer should not depend on whether or how some region B of a buffer has
been fontified before (multiline keywords are a notorious exception to
this rule).

Your proposal - please correct me if I'm wrong - may fontify modified
text disregarding whether the text appears in some window or not.  That,
in principle, defeats the aim of jit-lock to fontify as few text as
necessary in order to display it correctly.  I don't see anything wrong
with jit-fontifiying portions of text around displayed regions if such
portions would have to be scanned / searched anyway in order to
determine how displayed text shall be fontified.  Often a user might
want to scroll into such regions sooner or later anyway.  If, however,
filling or indenting larger regions will have to refontify text
regardless of whether the text is displayed anywhere, the overhead might
get intrusive.

reply via email to

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