summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2025-01-12 09:00:43 +0000
committerGrégoire Duchêne <gduchene@awhk.org>2025-01-12 09:00:43 +0000
commit698c3dc6c993f09586e3315fd51d9489a3189283 (patch)
tree24d792ebeae7e088b956a0f5549f1dda0bbb25e0
parenteca7b640967eab0806d0b5eb72983ae95b715c7a (diff)
darwin/emacs: Only load defined themes
-rw-r--r--dotfiles-darwin/emacs/functions.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/dotfiles-darwin/emacs/functions.el b/dotfiles-darwin/emacs/functions.el
index 1c57e59..492e099 100644
--- a/dotfiles-darwin/emacs/functions.el
+++ b/dotfiles-darwin/emacs/functions.el
@@ -38,7 +38,9 @@
"Configure themes, including theme switching."
(let ((day-theme (seq-random-elt (alist-get 'day my/themes)))
(night-theme (seq-random-elt (alist-get 'night my/themes))))
- (load-theme day-theme :no-confirm :no-enable)
- (load-theme night-theme :no-confirm :no-enable)
+ (when (custom-theme-p day-theme)
+ (load-theme day-theme :no-confirm :no-enable))
+ (when (custom-theme-p night-theme)
+ (load-theme night-theme :no-confirm :no-enable))
(run-at-time nil (* 15 60) #'my/maybe-switch-theme day-theme night-theme
#'my/macos-dark-p)))