smilingbuddha
smilingbuddha

Reputation: 14660

How to change the color of Emacs comments in C++/C mode to light pink

While in C++/C mode, Emacs 23 colors source code comments in bold red. Strings literals are colored in light pink.

I would like to switch these colors (comments in light pink and string literals in red) because I find the comments become an eye-sore in heavily commented programs..

How do I do this? I don't want to install a new color scheme since I am already very happy with the default one in other respects.

Upvotes: 15

Views: 10556

Answers (2)

ataylor
ataylor

Reputation: 66059

To do this interactively, place your point on a comment or string and run M-x customize-face and select the color you'd like.

Upvotes: 16

Asher L.
Asher L.

Reputation: 1297

Put this in your .emacs file:

(set-face-foreground 'font-lock-string-face "red")
(set-face-foreground 'font-lock-comment-face "light pink")

Upvotes: 26

Related Questions