.emacs中保存的主题在启动时不会加载

时间:2013-12-12 10:39:29

标签: emacs emacs-faces

当我去自定义主题时,我可以加载solarized-light主题,但即使它在我的.emacs中,它也不会在启动时加载。这是为什么?

(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(default ((t (:inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 150 :width normal :foundry "apple" :family "Menlo"))))
 '(compilation-mode-line-fail ((t (:inherit compilation-error :foreground "dark cyan" :weight bold))) t)
 '(cursor ((t (:background "green1"))))
 '(rainbow-delimiters-depth-2-face ((t (:foreground "MediumOrchid1"))))
 '(rainbow-delimiters-depth-3-face ((t (:foreground "dark cyan"))))
 '(rainbow-delimiters-depth-4-face ((t (:foreground "light green"))))
 '(rainbow-delimiters-depth-5-face ((t (:foreground "HotPink1"))))
 '(rainbow-delimiters-depth-6-face ((t (:foreground "yellow1"))))
 '(slime-repl-inputed-output-face ((t (:foreground "gray100")))))

2 个答案:

答案 0 :(得分:4)

这有效:

(add-hook 'emacs-startup-hook
  (lambda ()
    (load-theme 'solarized-light)
    ))

答案 1 :(得分:0)

我原来的回答是:

尝试将(load-theme 'solarized-light t)添加到.emacs文件的顶部。