abstract theme switching

This commit is contained in:
opfez 2021-07-18 01:45:37 +02:00
parent b09b6ab15e
commit 8d00eda928
1 changed files with 9 additions and 8 deletions

View File

@ -191,14 +191,15 @@
(global-set-key (kbd "M-z") 'zap-up-to-char)
;; Binds for switching between light and dark themes.
(global-set-key [f5] (lambda ()
(interactive)
(disable-theme 'basic)
(load-theme 'magik)))
(global-set-key [f6] (lambda ()
(interactive)
(disable-theme 'magik)
(load-theme 'basic)))
(defmacro fez/switch-theme (new-theme)
`(lambda ()
(interactive)
(disable-theme (car custom-enabled-themes))
(enable-theme ,new-theme)))
(global-set-key [f5] (fez/switch-theme 'magik))
(global-set-key [f6] (fez/switch-theme 'basic))
(add-hook 'emacs-lisp-mode-hook
(lambda () (local-set-key (kbd "C-c k") #'fez/insert-keybind)))