From cd6ac84014eb395754aa4cc84d53e2f7c54bea02 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Fri, 12 Aug 2011 15:09:05 +0200 Subject: [PATCH] Can use default-frame-alist and initial-frame-alist --- .emacs.d/functions.el | 7 ------- .emacs.d/init.el | 11 +++-------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/.emacs.d/functions.el b/.emacs.d/functions.el index 1767290..dcf6723 100644 --- a/.emacs.d/functions.el +++ b/.emacs.d/functions.el @@ -88,13 +88,6 @@ Currently adds | & ! . + = - / % * , < > ? : ->" "Find out which major-mode is currently used" (with-current-buffer buffer-or-string major-mode)) -(defun setup-system-frame-colours (&rest frame) - (let ((f (if (car frame) - (car frame) - (selected-frame)))) - (progn - (set-frame-font "-*-tamsyn-medium-*-*-*-15-*-*-*-*-80-*-*")))) - (defun show-init-sections () (interactive) (occur ";;\s +.*\s +;;") diff --git a/.emacs.d/init.el b/.emacs.d/init.el index cf602ab..1d95502 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -152,12 +152,6 @@ (defvar font-lock-operator-face 'font-lock-operator-face) (defvar font-lock-end-statement 'font-lock-end-statement) -(defadvice server-create-window-system-frame - (after set-system-frame-colours ()) - "Set custom frame colours when creating the first frame on a display" - (message "Running after frame-initialize") - (setup-system-frame-colours)) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; SETTINGS ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -190,7 +184,9 @@ `((".*" ,temporary-file-directory t))) (setq default-frame-alist ; default frame settings - (append '((font . "DejaVu Sans Mono-10:antialias=true")))) + (append '((font . "DejaVu Sans Mono-10:antialias=true")))) +(setq initial-frame-alist ; initial frame settings + (append '((font . "DejaVu Sans Mono-10:antialias=true")))) (if window-system (x-init) @@ -345,7 +341,6 @@ "?>\n" '(indent-region (point-min) (point-max))) -(ad-activate 'server-create-window-system-frame) (add-html-keywords) (make-face 'font-lock-operator-face) (make-face 'font-lock-end-statement)