如何设置默认的emacs背景和前景色?

xui*_*in. 19 emacs

在我的.emacs文件中,我有以下内容:

(set-foreground-color "#E0DFDB")
(set-background-color "#102372")
Run Code Online (Sandbox Code Playgroud)

当我启动emacs时,默认emacs窗口的颜色方案是正确的,但所有新窗口都以白色背景和黑色前景的默认颜色方案开始.任何人都能指出我如何让​​emacs在所有新窗口中设置我的首选配色方案吗?[注意:如果我M-x load-file ~/.emacs在打开一个新窗口后执行操作,颜色会按照我想要的方式设置,但每次我想打开一个新窗口时都会手动操作,这会让人分心/烦恼.

Alp*_*Alp 30

将以下内容添加到您的.emacs:

(add-to-list 'default-frame-alist '(foreground-color . "#E0DFDB"))
(add-to-list 'default-frame-alist '(background-color . "#102372"))
Run Code Online (Sandbox Code Playgroud)

您可能需要查看http://www.emacswiki.org/emacs/FrameParameters及其中的链接.


aar*_*ist 5

欢迎来到emacs.使用颜色主题更好地适应您的环境.http://emacswiki.org/?ColorTheme