I have a couple of theme packages installed on my emacs but I would like to assign a default theme.
I set the zenburn theme via a function
zenburn. I set the
leuven theme via another function
leuven. But in my emacs
startup I didn’t want to hard-code either of these function and thus
arose the need to set a variable to one of these functions.
You assign the function to a variable using
defvar and you call
that function linked to that variable using
(defvar default-theme 'zenburn)
(defun zenburn ()
"Activate zenburn theme."
;; disable other themes before setting this theme
(load-theme 'zenburn t))
(funcall default-theme) ;; Set the default theme
You can check out my full emacs config for visual settings on my git.