I am trying to do exactly this for my C code, but once I edit latex, the setting is still active in uncomfortable places. I need to preserve the setting once I exit emacs and in all the buffers with C code.
How can I restrict the behavior to only buffers with C code?
This is what I have in .emacs
(defun my-c-mode-faces ()
'(font-lock-comment-face ((t (:foreground "dark gray"))))
'(font-lock-function-name-face ((t (:foreground "#fce94f" :weight bold :height 1.5))))
'(font-lock-keyword-face ((t (:foreground "#b4fa70" :weight bold)))))
(add-hook 'c-mode-hook 'my-c-mode-faces)