I prefer to run emacs as a console application, and I would prefer that it be monochrome. I currently have (global-font-lock-mode 0) set in my init file, which works as I want it to on my mac. However, on my new debian laptop, I find that this (correctly) disables syntax highlighting in the body of files, but text in the echo area is showing in blue, which is hard to read on a black background.

Is there a way to ask emacs to be entirely monochrome?


The "hard to read echo area messages on dark background" is because under ttys, the colors are set by default under the assumption of a light background (and because there's no way for Emacs to query the terminal to know whether the background is dark or not).

You can fix this problem by customizing frame-background-mode.

It won't make Emacs fully monochrome, tho. Maybe you can get this result with a crude hack like the one below (guaranteed 100% untested), but please don't say it comes from me:

(advice-add 'face-spec-set-2 :around
            (lambda (f face frame attrs)
              (funcall f face frame (plist-put attrs :foreground nil))))
  • frame-background-mode got the message area sorted. Thanks! – Jon Kiparsky Oct 1 '19 at 2:46

I set the colors directly on the xterm window using ~/.Xresources, or ~/.Xdefaults (whichever works for your system) according to

 XTerm*termName: xterm-256color ! This forces 256 colors
 XTerm*background: black
 XTerm*foreground: white
 XTerm*faceName: DejaVu Sans Mono Book ! This is a truetype font
 XTerm*faceName: Monospace
 XTerm*faceSize: 10
 XTerm*charClass: 33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48

This way emacs -nw -q gives me a black-and-white emacs.

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.