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 09:56:41 +0300

> From: Jiajian Huang <wherejoystarts@gmail.com>
> Date: Sat, 20 Aug 2016 08:42:43 +0800
> 
> I recently notice that there's some strange behaviours of the font-lock of 
> the c++-mode.

I don't see it as strange.

> Let's start emacs by `emacs -Q` in the terminal, edit a new file `test.cpp` 
> and save the following contents
> 
> Then put the cursor two lines above the `int main` line, type `int test`, you 
> will find that the color of word `main` changes from *blue* to *black*
> 
> Backspace the current line to `in` or `i`, you will see that the color of 
> `main` change back to *blue*

When you insert "int test", without the semi-colon, your buffer now
has an invalid C++ program, so it's a small wonder the colors change.
When you replace "int test" with "in test", the "in" part is no longer
a C++ type, so it's again small wonder that colors change.

> Is this a emacs bug ?

I don't think it's a bug.

Thanks.





reply via email to

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