I am finding that in some cases (e.g. when TERM=xterm-16color
), the expression
(frame-parameter nil 'background-mode)
...evaluates to light
when it is in fact a dark background.
How does Emacs decide the value of a frame's background-mode
at startup, and how can I affect the decision?
EDIT: I realize that I can always run (setq frame-background-mode 'whatever)
, but this is not what I mean by "affect the decision" above. Rather, I mean: how can I modify the way I invoke Emacs (including the shell environment in which I invoke it) so that its default algorithm for setting frame-background-mode
at startup gets it right.
EDIT2: I do not see how the answers to Emacs Blue color too dark answer my post's main question, namely: how does Emacs figure out the value it should set frame-background-mode
to at startup? (For the sake of this question, assume that there is no .emacs
/initialization file at startup.)