branch: externals/modus-themes
commit 725bf50aba43ad4252d5e08661ade0b6613f92de
Author: Pierre Téchoueyres <[email protected]>
Commit: Pierre Téchoueyres <[email protected]>
Fix modus-themes-toggle by using modus-themes-get-current-theme
---
modus-themes.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modus-themes.el b/modus-themes.el
index a8ca94bf99..4e7fcbd35e 100644
--- a/modus-themes.el
+++ b/modus-themes.el
@@ -4083,8 +4083,9 @@ Disable other themes per
`modus-themes-disable-other-themes'."
(interactive)
(if-let* ((themes (modus-themes-known-p modus-themes-to-toggle))
(one (car themes))
- (two (cadr themes)))
- (modus-themes-load-theme (if (eq (car custom-enabled-themes) one) two
one))
+ (two (cadr themes))
+ (current (modus-themes-get-current-theme)))
+ (modus-themes-load-theme (if (eq current one) two one))
(modus-themes-load-theme (modus-themes-select-prompt "No valid theme to
toggle; select other"))))
;;;;; Rotate through a list of themes