mirror of
https://github.com/protesilaos/modus-themes.git
synced 2026-09-10 07:16:30 -04:00
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.
This commit is contained in:
parent
3cc6f7fec2
commit
7d06212953
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue