983 |
;; settings of enabled themes that apply to it. |
;; settings of enabled themes that apply to it. |
984 |
;; The property value is a list of settings, each with the form |
;; The property value is a list of settings, each with the form |
985 |
;; (THEME MODE VALUE). THEME, MODE and VALUE are as above. |
;; (THEME MODE VALUE). THEME, MODE and VALUE are as above. |
986 |
|
;; Each of these lists is ordered by decreasing theme precedence. |
987 |
|
;; Thus, the first element is always the one that is in effect. |
988 |
|
|
989 |
;; When a theme is disabled, its settings are removed from the |
;; Disabling a theme removes its settings from the `theme-value' and |
990 |
;; `theme-value' and `theme-face' properties, but the |
;; `theme-face' properties, but the theme's own `theme-settings' |
991 |
;; theme's own `theme-settings' property remains unchanged. |
;; property remains unchanged. |
992 |
|
|
993 |
|
;; Loading a theme implicitly enables it. Enabling a theme adds its |
994 |
|
;; settings to the symbols' `theme-value' and `theme-face' properties, |
995 |
|
;; or moves them to the front of those lists if they're already present. |
996 |
|
|
997 |
(defvar custom-loaded-themes nil |
(defvar custom-loaded-themes nil |
998 |
"Custom themes that have been loaded.") |
"Custom themes that have been loaded.") |
1107 |
(if (eq prop 'theme-value) |
(if (eq prop 'theme-value) |
1108 |
(custom-theme-recalc-variable symbol) |
(custom-theme-recalc-variable symbol) |
1109 |
(custom-theme-recalc-face symbol))))) |
(custom-theme-recalc-face symbol))))) |
1110 |
(push theme custom-enabled-themes) |
(push theme (delq theme custom-enabled-themes)) |
1111 |
;; `user' must always be the highest-precedence enabled theme. |
;; `user' must always be the highest-precedence enabled theme. |
1112 |
(unless (eq theme 'user) |
(unless (eq theme 'user) |
1113 |
(custom-enable-theme 'user))) |
(custom-enable-theme 'user))) |