all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Jiajian Huang <wherejoystarts@gmail.com>
Cc: 24271@debbugs.gnu.org
Subject: bug#24271: 25.1; font-lock problem of c++-mode
Date: Sat, 20 Aug 2016 11:15:02 +0300	[thread overview]
Message-ID: <83k2fbdfg9.fsf@gnu.org> (raw)
In-Reply-To: <02148DC1-20D2-41B8-BA43-CFBE6A07C3F6@gmail.com> (message from Jiajian Huang on Sat, 20 Aug 2016 15:57:02 +0800)

> From: Jiajian Huang <wherejoystarts@gmail.com>
> Date: Sat, 20 Aug 2016 15:57:02 +0800
> Cc: 24271@debbugs.gnu.org
> 
> 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	other threads:[~2016-08-20  8:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-20  0:42 bug#24271: 25.1; font-lock problem of c++-mode Jiajian Huang
2016-08-20  6:56 ` Eli Zaretskii
     [not found]   ` <1645ABE9-D61A-4DDE-B4D6-94A29A2CC2AA@gmail.com>
2016-08-20  7:52     ` Eli Zaretskii
2016-08-20  7:57     ` Jiajian Huang
2016-08-20  8:15       ` Eli Zaretskii [this message]
2016-08-20  8:27         ` Jiajian Huang
2016-08-20  8:36           ` Eli Zaretskii
2019-11-17  7:08       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83k2fbdfg9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=24271@debbugs.gnu.org \
    --cc=wherejoystarts@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.