This adds a hook function, a function that will be called when we open a C-file, so whenever there is a 'FIXME:', it gets a different color, so it stands out:

/* FIXME: check for foo */

Some notes:

I am using c-mode-common-hook instead of the c-mode-hook (as the emacs manual does); this means that this will work for all C-mode languages - C/C++/Java/Objective-C/...

I also added some extra keywords (TODO, BUG); you can of course add your own keywords there as well. It might help to use M-x re-builder (the Emacs regular expression builder), as Emacs regular expressions can be quite tricky to get right...

should work, but it could be that the font-lock-warning-face happens to be the same color as the normal comment; instead, you could do something like:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (set-face-underline 'font-lock-warning-face "yellow");;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;so the warnings (TODO:/FIXME:) get yellow underlines. Also, note that the pattern needs the ':' (so FIXME:, not FIXME)

I was trying to define different faces for different words (e.g., FIXME in red, TODO in blue and so forth). To do that I've tried to use some of the faces listed with the "list-faces-display" command instead of the "font-lock-warning-face". However, it didn't work -- I don't get any highlighting. Am I only supposed to use "font-lock-warning-face"?