~edwargix/emacs.d

0a02a3dbb747c4c561075afe933d94434e7e9dbb — David Florness 8 months ago a50935c
reorder theme function declarations

in preparation for the macro we're about to define
1 files changed, 19 insertions(+), 23 deletions(-)

M lisp/themes.el
M lisp/themes.el => lisp/themes.el +19 -23
@@ 1,4 1,22 @@
;; install themes
(defun disable-current-themes ()
  "disabled all currently-enabled themes"
  (interactive)
  (dolist (thm custom-enabled-themes)
    (disable-theme thm)))

(defun switch-theme (theme)
  ;; The (interactive ...) and subsequent (unless ...) code was copied from the
  ;; enable-theme function in custom.el.gz
  (interactive (list (intern
                      (completing-read
                       "Switch to custom theme: "
                       obarray (lambda (sym) (get sym 'theme-settings)) t))))
  (unless (custom-theme-p theme)
    (error "Undefined Custom theme %s" theme))
  ;; end of copied code

  (disable-current-themes)
  (enable-theme theme))

(use-package gruvbox-theme
  :config


@@ 19,28 37,6 @@
  :config
  (load-theme 'zenburn t t))

;; theme functions

(defun switch-theme (theme)
  ;; The (interactive ...) and subsequent (unless ...) code was copied from the
  ;; enable-theme function in custom.el.gz
  (interactive (list (intern
                      (completing-read
                       "Switch to custom theme: "
                       obarray (lambda (sym) (get sym 'theme-settings)) t))))
  (unless (custom-theme-p theme)
    (error "Undefined Custom theme %s" theme))
  ;; end of copied code

  (disable-current-themes)
  (enable-theme theme))

(defun disable-current-themes ()
  "disabled all currently-enabled themes"
  (interactive)
  (dolist (thm custom-enabled-themes)
    (disable-theme thm)))

(defun dark-theme ()
  (interactive)
  (switch-theme 'gruvbox-dark-hard))