Only prefer compiled theme on startup

...But not on doom/reload-theme or post-init load-theme calls.
This commit is contained in:
Henrik Lissner
2018-12-31 15:18:45 -05:00
parent 6d10b9bbdf
commit 81394cf733
2 changed files with 18 additions and 8 deletions

View File

@ -88,7 +88,9 @@ See `display-line-numbers' for what these values mean."
(let ((theme (or (car-safe custom-enabled-themes) doom-theme)))
(when theme
(mapc #'disable-theme custom-enabled-themes))
(doom|init-theme)
(when (and doom-theme (not (memq doom-theme custom-enabled-themes)))
(let (doom--prefer-theme-elc)
(load-theme doom-theme t)))
(doom|init-fonts)))
;;;###autoload