all repos — nixfiles @ ddcfb1818b220367de3705176e66b6a501512dae

System and user configuration, managed by nix and home-manager

Emacs: set default font in current and new frames
Alan Pearce alan@alanpearce.co.uk
Wed, 25 Jun 2014 09:31:31 +0100
commit

ddcfb1818b220367de3705176e66b6a501512dae

parent

544384c1882892edc0dc7643e07fe8729b564de8

1 files changed, 2 insertions(+), 1 deletions(-)

jump to
M tag-emacs/emacs.d/init.eltag-emacs/emacs.d/init.el
@@ -100,7 +100,8 @@ (defun ap/set-fonts (mono-face variable-face font-size)     (when mono-face
       (let ((default-font (concat mono-face "-" (number-to-string font-size))))
         (add-to-list 'default-frame-alist `(font . ,default-font))
-        (set-face-font 'fixed-pitch default-font)))
+        (set-face-font 'fixed-pitch default-font)
+        (set-frame-font default-font t t)))
     (when variable-face
       (set-face-font 'variable-pitch (concat variable-face "-"
                                              (number-to-string (1+ font-size))))))