From 233030d14e8f8f5bd99e61c7321316b5b9e38b5c Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 1 Jul 2015 00:45:33 -0700 Subject: [PATCH] Hopefully fix frame font at startup issue. --- dotfiles/emacs.d/init.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index 5f001070..fb0036e2 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -1994,13 +1994,15 @@ window is active in the perspective." (defadvice load-theme (after name activate) (remove-fringe-and-hl-line-mode))) -;; This is needed because you can't set the font at daemon start-up. -(add-hook 'after-make-frame-functions 'set-my-font-for-frame) -(add-hook 'after-make-frame-functions (lambda (frame) (set-theme))) -;; This is needed to ensure that linum-format is dynamic. -;; Without this we get massive margins. -(add-hook 'after-make-frame-functions 'remove-fringe-and-hl-line-mode) +;; This is needed because you can't set the font or theme at daemon start-up. +(add-hook 'after-make-frame-functions + (lambda (frame) + (set-theme) + (remove-fringe-and-hl-line-mode) + (set-my-font-for-frame))) +(add-to-list 'default-frame-alist + `(font . ,(random-choice imalison:fonts))) (when (file-exists-p custom-after-file) (load custom-after-file))