(if (>= emacs-major-version 24) (progn (add-to-list 'custom-theme-load-path "~/.emacs.d/themes") (setq my-color-themes (list 'cyberpunk 'zenburn 'solarized-dark 'solarized-light 'comidia 'late-night ;; 'MechanicalTurq ;; 'DeepBlueDay 'tango-dark )) (defun my-theme-set-default () (interactive) (setq theme-current my-color-themes) (load-theme (car theme-current) t) ;; (set-default-font font-default) ;; restore default font ) ;; TODO: add reverse funcitonnality (defun my-theme-cycle () (interactive) (disable-theme (car theme-current)) (setq theme-current (cdr theme-current)) (if (null theme-current) (setq theme-current my-color-themes)) (load-theme (car theme-current) t) ;; (set-default-font font-default) ;; restore default font ) (my-theme-set-default) (global-set-key [f12] 'my-theme-cycle) ) ;; else (progn (require 'color-theme) ;; (require 'color-theme-solarized) ;; doesn't work w/ emacsclient 23 on linux (setq my-color-themes (list ;; 'color-theme-solarized-light ;; 'color-theme-solarized-dark 'color-theme-comidia ;; 'color-theme-midnight 'color-theme-aalto-light 'color-theme-late-night ;; 'color-theme-kingsajz ;; 'color-theme-simple-1 )) (setq fav-color-themes-d (list 'color-theme-comidia 'color-theme-late-night 'color-theme-simple-1 'color-theme-midnight 'color-theme-hober )) (setq fav-color-themes-l (list 'color-theme-aalto-light 'color-theme-kingsajz )) (defun my-theme-set-default () (interactive) (setq theme-current my-color-themes) (funcall (car theme-current))) (defun my-theme-cycle () (interactive) (setq theme-current (cdr theme-current)) (if (null theme-current) (setq theme-current my-color-themes)) (funcall (car theme-current)) (message "%S" (car theme-current))) (setq theme-current my-color-themes) (eval-after-load "color-theme" '(progn (color-theme-initialize) (my-theme-set-default))) (setq color-theme-is-global t color-theme-is-cumulative t) (global-set-key [f12] 'my-theme-cycle) ) )