Reputation: 38879
The title is pretty self explanatory.
I would like to change the comment colour from black to green in lua-mode.
I've tried putting this into .emacs (set-face-foreground 'font-lock-string-face "red")
But it didn't work. Any ideas?
Upvotes: 1
Views: 912
Reputation: 38879
I've solved it.
Uninstalled emacs 23 apt-get remove emacs
Followed the instructions from: https://launchpad.net/~cassou/+archive/emacs Installed emacs-starter-kit: https://github.com/technomancy/emacs-starter-kit
Installed lua-mode with M-x package-install RET lua-mode
Restarted, and loaded a lua file. Now both single and multi-line comments have the same comment color and I can change it by setting font-lock-comment-face color which by default is brickred, to darkgreen according to Ivan's answer above.
Upvotes: 0
Reputation: 5301
If you put the cursor in the comment, and type M-x customize-face RET, it will offer to customize the correct face automatically (in this case font-lock-comment-face
as Rupert mentioned). This gives you a nice way to play around with different changes to the face (to get exactly the right color etc.) and then save it to your .emacs
. This is the easiest way to find out any face that you want to change.
Upvotes: 3
Reputation: 2803
At least on my version of Emacs, if I call describe-face
on a bit of a comment in a Lua file, I get font-lock-comment-face
, rather than font-lock-string-face
. Have you changed the wrong variable?
Upvotes: 0