abstract theme switching
This commit is contained in:
parent
b09b6ab15e
commit
8d00eda928
17
custom.el
17
custom.el
|
@ -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)))
|
||||
|
|
Loading…
Reference in New Issue