On Thu, Feb 08, 2001 at 09:26:47PM -0800, John L . Fjellstad wrote: > How can I add colors to new types in c/c++ mode in x/emacs? > > For instance, I want types like > const, namespace, class > to be colored. >
Try something like this in your .emacs: (font-lock-add-keywords 'c++-mode '(("\\<\\(TODO\\):" 1 font-lock-warning-face prepend))) This highlights the word TODO: where it exists as a single word, even within comments. -Anthony.