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 . . .

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top