lawrence mitchell <wence@gmx.li> writes:
(bind-hook c-mode-hook
^^^^^^^^^^^^^^^^^^^^^
You probably meant:
(add-hook 'c-mode-hook
(font-lock-add-keywords nil
'(("\\<\\(\\sw+\\) ?(" 1 font-lock-function-call-face))) t))
Yes, sorry, I didn't test the code I posted, I just extracted the
relevant looking parts from my init files and accidentally included my
bind-hook macro. Here is a tested version
;; turn on font lock with maximum decoration
(global-font-lock-mode t)
(setq font-lock-maximum-decoration t)
(require 'font-lock)
;; create a face for function calls
(defface font-lock-function-call-face
'((t (:foreground "DarkBlue")))
"Font Lock mode face used to highlight function calls."
:group 'font-lock-highlighting-faces)
(defvar font-lock-function-call-face 'font-lock-function-call-face)
;; add it to the font lock tables
(add-hook 'c-mode-hook
(lambda ()
(font-lock-add-keywords
nil
'(("\\<\\(\\sw+\\) ?(" 1 font-lock-function-call-face)) t)))