1

To avoid the white background, I changed the default emacs background color to "dark gray" -- it's perfect for working in the GUI at night . . . however, emacs is also my default editor for terminals, and is basically unreadable with the new background color.

Is there a way I can have the background color for the GUI, and then all default settings (black background and default syntax highlighting) for when emacs is launched in the terminal to edit PKGBUILDS and other files?

Thanks! I've tried searching the web to no avail . . .

1 Answers1

3

You could add something like the following to your init.el.

(when (display-graphic-p)
  (set-background-color "darkgrey"))

It will not change the background color if run in terminal.

Chris Barrett
  • 3,383
  • 17
  • 21
  • Oh man, this is so amazing! Thank you! This really just made my day! On the off chance -- You wouldn't happen to know how to change the background color of the MIT/Scheme editor EdWin, would you? I was looking to go from white to another grey if possible... (it's based on Emacs) – user1947267 Mar 24 '13 at 06:57
  • Glad to help. I haven't used EdWin, but you could try posting a separate question here on SO. – Chris Barrett Mar 24 '13 at 21:58