diff options
author | Martin Polden <mpolden@mpolden.no> | 2022-07-05 19:33:56 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2022-07-05 19:33:56 +0200 |
commit | acd61b0e004a7b543cda7a016f99ae1bf9a328fb (patch) | |
tree | 78bf45943bb75362f83bf681d40b02a3a845e2a8 /lisp/init-theme.el | |
parent | c6e74228997eb4c9e4191bd5fabc0f8613c819f1 (diff) |
theme, vterm: use symbol for current theme
Diffstat (limited to 'lisp/init-theme.el')
-rw-r--r-- | lisp/init-theme.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/init-theme.el b/lisp/init-theme.el index 82d54c0..1232f64 100644 --- a/lisp/init-theme.el +++ b/lisp/init-theme.el @@ -18,11 +18,11 @@ (call-interactively 'load-theme)))) (defun mpolden/current-theme () - "Return current theme, which is either \"light\" or \"dark\"." + "Return current theme, which is either 'light or 'dark." (cond - ((memq mpolden/theme-light custom-enabled-themes) "light") - ((memq mpolden/theme-dark custom-enabled-themes) "dark") - (t (error "Failed to detect light theme. Enabled themes: %s" + ((memq mpolden/theme-light custom-enabled-themes) 'light) + ((memq mpolden/theme-dark custom-enabled-themes) 'dark) + (t (error "Failed to detect current theme. Enabled themes: %s" custom-enabled-themes)))) (defun mpolden/toggle-theme () @@ -30,7 +30,7 @@ The variables `mpolden/theme-light' and `mpolden/theme-dark' decides the themes to toggle between." (interactive) - (let* ((is-light (equal (mpolden/current-theme) "light")) + (let* ((is-light (eq (mpolden/current-theme) 'light)) (new-theme (if is-light mpolden/theme-dark mpolden/theme-light)) (new-vterm-theme (if is-light "dark" "light"))) (mpolden/switch-theme new-theme) |