I can do this:

 '(j-verb-face ((t (:foreground "Red")))))

But what I want is to set the color to one that is theme-dependent.

I tried the following, which causes a "wrong argument type" error:

 '(j-verb-face ((t (font-lock-function-name-face)))))

How can I set the color of j-verb-face to be font-lock-function-name-face?


Found a simpler solution!

(setq j-verb-face font-lock-function-name-face)
  • 1
    Not all faces have corresponding variables with the same name. Your solution assumes that the code used to apply the face references the variable (rather than the face name) [written slightly differently, such as as a single quote preceding the face name], and that both j-verb-face and font-lock-function-name-face have been assigned variables with the same name as the face (which happens to be the case here, but certainly not always).
    – lawlist
    Aug 14 at 20:42
  • Yeah, I read recently that faces are not variables, which is weird to me. This solution seemed to work when I tried it, but I have no idea what edge cases may exist. Aug 16 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.