 (defun doom|init-theme ()
   "Set the theme and load the font, in that order."
   (when doom-theme
-    (load-theme doom-theme t))
-  (add-hook 'after-make-frame-functions #'doom|init-theme-in-frame))
+    (load-theme doom-theme t)))
 
 ;; Getting themes to remain consistent across GUI Emacs, terminal Emacs and
 ;; daemon Emacs is hairy. `doom|init-theme' sorts out the initial GUI frame.

;; Theme & font
;;

(defun doom|init-fonts (&optional frame)
  "Initialize fonts."
  (when (fontp doom-font)
    (map-put default-frame-alist 'font (font-xlfd-name doom-font)))
  (or frame (setq frame (selected-frame)))
  (condition-case-unless-debug ex
      (progn
        (when (fontp doom-font)
          (set-face-attribute 'fixed-pitch frame :font doom-font))
        ;; Fallback to `doom-unicode-font' for Unicode characters
        (when (fontp doom-unicode-font)
          (set-fontset-font t 'unicode doom-unicode-font frame))
        ;; ...and for variable-pitch-mode:
        (when (fontp doom-variable-pitch-font)
          (set-face-attribute 'variable-pitch frame :font doom-variable-pitch-font)))
    ('error
     (if (string-prefix-p "Font not available: " (error-message-string ex))
         (lwarn 'doom-ui :warning

;; frames, however. There's always `doom//reload-theme' if you need it!
(defun doom|init-theme-in-frame (frame)
  "Reloads the theme in new daemon or tty frames."
  (when (and (framep frame)
             (not (eq doom-last-window-system (display-graphic-p frame))))
    (with-selected-frame frame
      (doom|init-theme))
    (setq doom-last-window-system (display-graphic-p frame))))

;; fonts
(add-hook 'doom-init-ui-hook #'doom|init-fonts)
;; themes
(add-hook 'after-make-frame-functions #'doom|init-theme-in-frame)
(unless (daemonp)
  (add-hook 'doom-init-ui-hook #'doom|init-theme))


;;
