bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#24271: 25.1; font-lock problem of c++-mode


From: Eli Zaretskii
Subject: bug#24271: 25.1; font-lock problem of c++-mode
Date: Sat, 20 Aug 2016 11:15:02 +0300

> From: Jiajian Huang <address@hidden>
> Date: Sat, 20 Aug 2016 15:57:02 +0800
> Cc: address@hidden
> 
> This is a more serious example. As you can see, I normally input such a short 
> line “using std::string”, the color have change 6 times !
> I don’s think any of them is a “valid” C++ program except the last one.
> 
> I’ve not seen any other major mode has such a “feature”. This is my first 
> time get into c++-mode. Because of this mechanism,
> the current input area keep “flashing” too much when keep typing fast within 
> a buffer full of words even under such a light color theme. 
> I feel that it’s so different from other major mode(python-mode etc.) soon as 
> I switch to c++-mode. Maybe it’s not a bug, but I don’t think it’s a good 
> feature.

The effects of changing the colors is exacerbated in your case by the
fact that you use a bold face for some of the faces.  If you just use
colors, the changes are not really as annoying as you say, IMO.

Regardless of what Alan, the developer of the C++ mode says about
this, I think you can avoid at least some of the unpleasant effects of
this in your setup if you activate stealth fontification by setting
jit-stealth-time to some non-nil value, like 0.1.  Then Emacs will not
attempt to re-fontify the buffer as long as you are typing, and will
only do so after Emacs has been idle for 0.1 sec (or any other value
you assign to jit-stealth-time).

(If you do try jit-stealth, I suggest to also set jit-stealth-load to
something like 25, to prevent stealth fontifications from hogging the
CPU.)





reply via email to

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