fix: ignore doom-theme if load-theme is used

Users shouldn't be using both, and `load-theme` should be higher
priority (because it's easier to do by accident).

Fix: #8257
Amend: #8119
Amend: 50b9afbb2d
This commit is contained in:
Henrik Lissner
2025-02-02 03:19:39 -05:00
parent e81b5796a3
commit 38868c79f5

View File

@ -624,7 +624,12 @@ them as such. Also intended as a helper for `doom--theme-is-colorscheme-p'."
(with-temp-buffer
(let ((enable-theme-functions
(remq 'doom-enable-theme-h enable-theme-functions)))
(doom-run-hooks 'doom-load-theme-hook))))))
(doom-run-hooks 'doom-load-theme-hook))
;; HACK: If the user uses `load-theme' in their $DOOMDIR instead of
;; setting `doom-theme', override the latter, because they shouldn't
;; be using both.
(unless (memq theme (ensure-list doom-theme))
(setq-default doom-theme theme))))))
(add-hook! 'after-make-frame-functions :depth -90
(defun doom-fix-frame-color-parameters-h (f)