From 87abe8fa15ca4822fdd69330b910e814dab8f6d7 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 27 Nov 2013 01:23:06 +0100 Subject: Fix config for phoenix --- .emacs.d/init.org | 53 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 23 deletions(-) (limited to '.emacs.d/init.org') diff --git a/.emacs.d/init.org b/.emacs.d/init.org index 28b8cf9..1f37c7b 100644 --- a/.emacs.d/init.org +++ b/.emacs.d/init.org @@ -182,16 +182,19 @@ running a daemon, just set the theme. #+BEGIN_SRC emacs-lisp - (let ((setp (not (daemonp)))) - (defun init-set-theme (frame) - "Try to set the theme for the current (first) frame." - (ignore frame) - (unless setp - (run-at-time .1 nil (lambda () (setq setp (load-theme 'yoshi t))))))) - - (if (daemonp) - (add-hook 'after-make-frame-functions #'init-set-theme) - (eval-after-init (load-theme 'yoshi t))) + (let ((theme (if (equal system-name "drd") + 'yoshi + 'leuven))) + (let ((setp (not (daemonp)))) + (defun init-set-theme (frame) + "Try to set the theme for the current (first) frame." + (ignore frame) + (unless setp + (run-at-time .1 nil (lambda () (setq setp (load-theme theme t))))))) + + (if (daemonp) + (add-hook 'after-make-frame-functions #'init-set-theme) + (eval-after-init (load-theme theme t)))) #+END_SRC * Browsing with eww @@ -222,12 +225,13 @@ #+BEGIN_SRC emacs-lisp (defun init-set-emacs-lisp-symbols () - (setq prettify-symbols-alist - (append prettify-symbols-alist - '(("<=" . ?≤) - (">=" . ?≥) - ("sqrt" . ?√))))) - + (when (boundp 'prettify-symbols-alist) + (setq prettify-symbols-alist + (append prettify-symbols-alist + '(("<=" . ?≤) + (">=" . ?≥) + ("sqrt" . ?√)))))) + (add-hook 'emacs-lisp-mode-hook #'init-set-emacs-lisp-symbols) #+END_SRC @@ -237,19 +241,22 @@ #+BEGIN_SRC emacs-lisp (defun init-set-python-symbols () - (setq prettify-symbols-alist - '(("lambda" . ?λ) - ("<=" . ?≤) - (">=" . ?≥) - ("!=" . ?≠)))) - + (when (boundp 'prettify-symbols-alist) + (setq prettify-symbols-alist + '(("lambda" . ?λ) + ("<=" . ?≤) + (">=" . ?≥) + ("!=" . ?≠))))) + (add-hook 'python-mode-hook #'init-set-python-symbols) #+END_SRC Now just turn it on for =prog-mode=. #+BEGIN_SRC emacs-lisp - (add-hook 'prog-mode-hook 'prettify-symbols-mode) + (when (and (>= emacs-major-version 24) + (> emacs-minor-version 3)) + (add-hook 'prog-mode-hook 'prettify-symbols-mode)) #+END_SRC * Slime implementations -- cgit v1.2.3-54-g00ecf