From b1c4c71db309021c818f0eb57d3177f3b4dddd7d Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 24 May 2015 04:35:45 -0400 Subject: emacs: Fix error when config is loaded in daemon mode. --- dotfiles/.emacs.d/init.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dotfiles/.emacs.d/init.el b/dotfiles/.emacs.d/init.el index f2ab70a..8c46f79 100644 --- a/dotfiles/.emacs.d/init.el +++ b/dotfiles/.emacs.d/init.el @@ -50,8 +50,11 @@ "Return 't' if FONT exists." (not (null (x-list-fonts font)))) -(when (font-exists-p "Inconsolata") - (set-default-font "Inconsolata-11")) +;; The font cannot be set until a frame has been created. +(add-to-list 'after-make-frame-functions + (lambda (frame) + (when (font-exists-p "Inconsolata") + (set-default-font "Inconsolata-11")))) (load-theme 'wombat t) (column-number-mode t) -- cgit v1.2.3