I'm using Emacs in a terminal and am finding that when the
TERM environment variable is changed between
xterm-256color, the default colors within Emacs are set differently.
Just to be clear, I'm getting full 256 bit color support in both situations (running with byobu/tmux and running with Gnome Terminal respectively), but Emacs is applying different colors such that when I look at the same Python file, the syntax highlighting uses differ colors in each. When I manually change the colors using
color-theme-select to the same theme, they then use the same colors. The problem is that I have no idea how the colors are set to begin with, and more importantly, why they are set differently.
This behavior remains constant when I force byobu to use
TERM=xterm-256color, so it doesn't seem like this is a problem with either of the terminal emulators.
How can I ensure that Emacs uses the same colors in each situation?