summary refs log tree commit diff stats
path: root/emacs/.emacs.d
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d')
-rw-r--r--emacs/.emacs.d/main.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index 226cc2fb..edd75073 100644
--- a/emacs/.emacs.d/main.el
+++ b/emacs/.emacs.d/main.el
@@ -1560,14 +1560,16 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer."
       (add-to-list 'load-suffixes ".el.gpg")
       (load-gpg (expand-file-name (system-name) user-emacs-directory)))))
 
-(defun first-frame-hook ()
+(defun first-frame-hook (frame)
   "Hook run only after first frame is created."
   (remove-hook 'after-make-frame-functions #'first-frame-hook)
-  (run-at-time nil nil 'load-private-data))
+  (run-at-time nil nil #'load-private-data)
+  (run-at-time nil nil #'ap/set-fonts-according-to-system))
 
-(if (eq 1 (length (frame-list)))
-    (add-hook 'after-init-hook #'load-private-data)
-  (add-hook 'after-make-frame-functions #'first-frame-hook))
+(if (or (daemonp)
+        (not (eq 1 (length (frame-list)))))
+    (add-hook 'after-make-frame-functions #'first-frame-hook)
+  (add-hook 'after-init-hook #'load-private-data))
 ;; #+END_SRC
 
 ;; ** Minibuffer