1

How can i change syntax highlighting colors for the emacs program? The relevant question "Change Emacs syntax highlighting colors" doesn't help me. Perhaps it is either obsolete, incomplete, or simply assumes too much. Is there a tutorial for this somewhere? Thanks in advance.

1 Answer 1

6

You want to customize individual faces (or a theme, if you are using one).

Use M-x customize-face.

Use C-u C-x = to find out which faces are used at the cursor position (point).

Use M-x list-faces-display to see what all the faces look like.

For font-lock (the default syntax highlighting mechanism), see the faces whose names begin with font-lock-:

font-lock-builtin-face font-lock-comment-delimiter-face font-lock-comment-face font-lock-constant-face font-lock-doc-face font-lock-function-name-face font-lock-keyword-face font-lock-negation-char-face font-lock-preprocessor-face font-lock-regexp-grouping-backslash font-lock-regexp-grouping-construct font-lock-string-face font-lock-type-face font-lock-variable-name-face font-lock-warning-face 
Sign up to request clarification or add additional context in comments.

1 Comment

@Drew has given you the key ingredients However, I wanted to emphasise his point about themes. While you can do a lot with individual face customization, I highly recommend trying out a few different themes first. Individual face customization can quickly spiral out of control if there are a lot of faces to customize. Far better to find a theme close to your preferences and then just tweak that with a few customize-face settings..

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.