Este es el módulo que escribí para mis propios .emacs para resolver este problema. Mi enfoque básico parece ser similar en la intención a la solución de Maxim Kim (rotando a través de una lista de temas), pero creo que el mío es más modular y, por lo tanto, puede ser más accesible para un extraño. Por otro lado, no tengo ninguna de las características de persistencia de Kim.
Aquí está el código relevante, dejando de lado las declaraciones variables y los comentarios del paquete:
(require 'dash)
(defun multitheme--enable (theme)
"As `enable-theme', but load the theme if necessary.
Respect `custom-safe-themes'."
(if (custom-theme-p theme)
(enable-theme theme)
(load-theme theme)))
(defun multitheme-cycle ()
"Cycle between the themes in `multitheme-base-theme-list'.
If none of these themes is currently active, instead enable the
first element of `multitheme-base-theme-list'.
Also re-enable `multitheme-overtheme' so it remains \"on top\" of
the base theme.
If a theme to be enabled is not yet defined, attempt to load it
first (using `load-theme'). Respect `custom-safe-themes'.
After all theme changes have been made, run
`multitheme-base-change-hook'."
(interactive)
(when (require 'validate nil :noerror)
(validate-variable 'multitheme-base-theme-list)
(validate-variable 'multitheme-overtheme)
(validate-variable 'multitheme-base-theme-change-hook))
(let ((themes (-drop-while
(lambda (thm) (not (custom-theme-enabled-p thm)))
multitheme-base-theme-list)))
;; Cycle base theme
(if (null themes)
(multitheme--enable (car multitheme-base-theme-list))
(disable-theme (car themes))
(multitheme--enable (or (cadr themes)
(car multitheme-base-theme-list))))
;; Reassert overtheme
(when multitheme-overtheme
(multitheme--enable multitheme-overtheme))
;; Run hooks
(run-hooks 'multitheme-base-theme-change-hook)))
(car custom-enabled-themes)
devuelve el tema habilitado actualmente.