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

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

Re: C and C++ highlighting is not working properly (font-lock)


From: Enselic
Subject: Re: C and C++ highlighting is not working properly (font-lock)
Date: Sat, 30 Jun 2007 01:34:09 -0700
User-agent: G2/1.0

On 30 Juni, 03:45, deccard <address@hidden> wrote:
> I'm using font-lock, but I'm getting quite weird behavior out of it. I
> get right colors only for the first word. Even using tab messes it up!
> What could be going on? I have not added anything to my .emacs.
>
> Here is a screen shot of my pseudo c++ 
> program:http://www.helsinki.fi/~ipohjala/Problem.png

First of all, font-lock probably assumes proper syntax and sane
indentation, so fix that first.

Second of all, it might look more wrong than it is if you have the
same color for two different fonts.

When I setup these colors and want full control, I bring up M-x
customize-group font-lock-faces RET and M-x list-colors-display RET.
Then I change a font, save the settings, switch to a C++ buffer, look
at the results, go back to the customization group, change a color,
save changes, look at result in C++ buffer, etc.

This way I find that one gets much control over syntax.

Hope this helps in some way,
- Martin Nordholts



reply via email to

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