From f0e81c65f1b996fc216e631445b479bc4dcd9360 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 24 Nov 2016 13:26:14 -0800 Subject: [PATCH] [Emacs] Fix initial setup of frame --- dotfiles/emacs.d/README.org | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 5a506ee3..63ab69ee 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -4720,13 +4720,17 @@ load-theme hook (See the heading below). (load-theme imalison:dark-theme t) (spaceline-compile) (imalison:remove-fringe-and-hl-line-mode)) +#+END_SRC +*** Hooks to set everything up +#+BEGIN_SRC emacs-lisp +(defun imalison:initial-setup-hook (&rest args) + (apply 'imalison:appearance args) + (remove-hook 'after-make-frame-functions 'imalison:initial-setup-hook)) ;; This is needed because you can't set the font or theme at daemon start-up. ;; (when (display-graphic-p) (imalison:appearance)) (add-hook 'after-init-hook 'imalison:appearance) -(add-hook 'after-make-frame-functions 'imalison:appearance) -;; TODO/XXX: why do we immediately remove this hook? -(remove-hook 'after-make-frame-functions 'imalison:appearance) +(add-hook 'after-make-frame-functions 'imalison:initial-setup-hook) #+END_SRC * Post Init Custom #+BEGIN_SRC emacs-lisp