branch: externals/modus-themes
commit 7d062129530b93b2d8221d88e441a0b4145df3f3
Author: Pierre Téchoueyres <[email protected]>
Commit: Pierre Téchoueyres <[email protected]>
Fix modus-themes--disable-themes to follow modus-themes-disable-other-themes
Disable themes of the modus collection when the value of the variable
is nil as stated in the docstring.
---
modus-themes.el | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/modus-themes.el b/modus-themes.el
index 35dc22d442..31383c42b9 100644
--- a/modus-themes.el
+++ b/modus-themes.el
@@ -3916,8 +3916,15 @@ If THEME is unknown, return nil. Else return (append
OVERRIDES USER CORE)."
(defun modus-themes--disable-themes (themes)
"Disable THEMES per `modus-themes-disable-other-themes'."
- (when modus-themes-disable-other-themes
- (mapc #'disable-theme themes)))
+ (mapc #'disable-theme
+ (if modus-themes-disable-other-themes
+ themes
+ (seq-filter
+ (lambda (theme)
+ (when-let* ((properties (get theme 'theme-properties))
+ (core (plist-get properties :modus-core-palette)))
+ theme))
+ themes))))
(defun modus-themes-load-theme (theme &optional hook)
"Load THEME while disabling other themes.