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