mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Fix theme not loading in daemon sessions #1397
This commit is contained in:
@ -479,11 +479,12 @@ Fonts are specified by `doom-font', `doom-variable-pitch-font',
|
|||||||
(font-get (caddr e) :family))
|
(font-get (caddr e) :family))
|
||||||
(signal 'doom-error e)))))
|
(signal 'doom-error e)))))
|
||||||
|
|
||||||
(defun doom|init-theme ()
|
(defun doom|init-theme (&optional frame)
|
||||||
"Load the theme specified by `doom-theme'."
|
"Load the theme specified by `doom-theme' in FRAME."
|
||||||
(when (and doom-theme (not (memq doom-theme custom-enabled-themes)))
|
(when (and doom-theme (not (memq doom-theme custom-enabled-themes)))
|
||||||
(let ((doom--prefer-theme-elc t))
|
(with-selected-frame (or frame (selected-frame))
|
||||||
(load-theme doom-theme t))))
|
(let ((doom--prefer-theme-elc t))
|
||||||
|
(load-theme doom-theme t)))))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
@ -508,7 +509,8 @@ Fonts are specified by `doom-font', `doom-variable-pitch-font',
|
|||||||
:around #'doom*run-switch-buffer-hooks))
|
:around #'doom*run-switch-buffer-hooks))
|
||||||
|
|
||||||
;; Apply `doom-theme'
|
;; Apply `doom-theme'
|
||||||
(unless (daemonp)
|
(if (daemonp)
|
||||||
|
(add-hook 'after-make-frame-functions #'doom|init-theme)
|
||||||
(add-hook 'doom-init-ui-hook #'doom|init-theme))
|
(add-hook 'doom-init-ui-hook #'doom|init-theme))
|
||||||
;; Apply `doom-font' et co
|
;; Apply `doom-font' et co
|
||||||
(add-hook 'doom-after-init-modules-hook #'doom|init-fonts)
|
(add-hook 'doom-after-init-modules-hook #'doom|init-fonts)
|
||||||
|
Reference in New Issue
Block a user