I recently notice that there's some strange behaviours of the font-lock of the c++-mode.
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
i, you will see that the color of
main change back to blue.
This is not a very big problem under this test, but I use color theme that the function names are in bold type. So when I add a function above another function, the font-lock of the below one keep changing all the time which is really annoying.
Is this a emacs bug ? I want bold function name and other keywords but how can I get rid of it ? Any help will be appreciated.