mirror of
https://github.com/protesilaos/modus-themes.git
synced 2026-09-10 07:16:30 -04:00
Use 'load' instead of 'load-theme' for the initial theme reification
This looks cleaner and saves us from the trouble of having to deal with any hooks after load-theme at this early stage. I took the file binding from the load-theme source. Fundamentally, I want to have a theme symbol, like 'modus-operandi' exist with all the relevant 'theme-properties' so that something like 'modus-themes-list-colors' can work with it even before modus-operandi-theme.el is loaded.
This commit is contained in:
parent
6e1bdce593
commit
ef3e0e5d4d
|
|
@ -3780,9 +3780,10 @@ Also see `modus-themes-get-themes'.")
|
|||
;; side effect of adding the relevant `theme-properties' to it.
|
||||
(unless (and (memq theme modus-themes--activated-themes)
|
||||
(custom-theme-p theme))
|
||||
(let ((enable-theme-functions nil)
|
||||
(modus-themes-after-load-theme-hook nil))
|
||||
(load-theme theme t t))
|
||||
(let ((file (locate-file (concat (symbol-name theme) "-theme.el")
|
||||
(custom-theme--load-path)
|
||||
'("" "c"))))
|
||||
(load file nil t))
|
||||
(add-to-list 'modus-themes--activated-themes theme)))
|
||||
|
||||
(defun modus-themes--belongs-to-family-p (theme family)
|
||||
|
|
|
|||
Loading…
Reference in a new issue