mirror of
https://github.com/protesilaos/modus-themes.git
synced 2026-09-10 07:16:30 -04:00
Rewrite modus-themes--activate for clarity
This commit is contained in:
parent
1d0348fc64
commit
01080b292b
|
|
@ -3789,10 +3789,14 @@ Also see `modus-themes-get-themes'.")
|
|||
;; NOTE 2025-09-29: We need to do this instead of pushing to the
|
||||
;; `custom-known-themes' because loading the theme has the desired
|
||||
;; side effect of adding the relevant `theme-properties' to it.
|
||||
(unless (and (memq theme modus-themes--activated-themes)
|
||||
(custom-theme-p theme))
|
||||
(load-theme theme t t)
|
||||
(add-to-list 'modus-themes--activated-themes theme)))
|
||||
(let ((not-registered-p (not (memq theme modus-themes--activated-themes))))
|
||||
(cond
|
||||
((or (and (memq theme custom-enabled-themes) not-registered-p)
|
||||
(and (custom-theme-p theme) not-registered-p))
|
||||
(add-to-list 'modus-themes--activated-themes theme))
|
||||
((not (memq theme modus-themes--activated-themes))
|
||||
(load-theme theme t t)
|
||||
(add-to-list 'modus-themes--activated-themes theme)))))
|
||||
|
||||
(defun modus-themes--belongs-to-family-p (theme family)
|
||||
"Return non-nil if THEME has FAMILY property."
|
||||
|
|
|
|||
Loading…
Reference in a new issue