I have a problem with emacs color, I change color for konsole, gnome-term and urxvt but, when I open a .c file, there are not the same colors that my terminal color sheme.

I haven't an emacs theme.

When I type M-x list-colors-display, the 16 firsts colors are the same color as my terminal colorsheme.

enter image description here

Thank you for answer ;)

  • Is the "strange" you are talking about the fact that there is syntax based color in emacs? – crashmstr Mar 20 '13 at 11:40
  • 1
    You haven't actually asked a question here. Your title invites the response They don't look strange to me but I sense that that is not the sort of response you want. Could you be more explicit about what you want to know ? – High Performance Mark Mar 20 '13 at 12:06
  • Are you sure you have TERM environment variable set to xterm-256color? – user49531 Mar 20 '13 at 12:43
  • I work with xterm-256color (echo $TERM), Like you can see in picture, colors printed are not the same as the list of color (m-x list-colors-displays), whereas on my opensuse, when I change my term colorsheme, emacs colors change also, thanks for answers, ps : I m on fedora 18 – user2190535 Mar 20 '13 at 12:52

The colors used for syntax highlighting are not limited to those first 16 colors when you are 256 color mode. The syntax highlighting works by assiging different faces to different parts of the code (identifiers, strings, keywords, etc). Each of those faces can have different styles applied to it. If you want to change the color used by one of these faces, run M-x customize-face RET. customize-face lets you edit any face emacs already knows about, and it defaults to editing the face in use at point (where the text cursor is).

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.