tags:

views:

49

answers:

1

Hello:

In emacs, I want a function name get highlighted when it is called, not only defined or declared. I try to do this with a 'color-theme' theme file. But the theme file does not seem to have a variable to work this out, it has a variable 'font-lock-function-name-face', but this one only works for function declaration.

Is there some solution?

Thanks,

Utoah

A: 

There are a number of standard font lock faces, such as font-lock-comment-face, font-lock-function-name-face, font-lock-type-face, etc. It's up to each major mode to decide what is highlighted in each face. Programming language modes typically put comments in font-lock-comment-face, function names in definitions in font-lock-function-name-face, and so on. Some modes use font-lock-type-face only for definitions of type names while others use it for type annotations. There is no standard font lock face for function names in function calls, so most modes don't contain code to detect them. You'll probably have to modify the font locking code for the mode you're interested in.

Gilles