comparison lisp/custom.el @ 64221:fab4526842b1

Fix previous change.
author Richard M. Stallman <rms@gnu.org>
date Mon, 11 Jul 2005 01:05:17 +0000
parents 38b6647b9ed4
children 278c7e4c078a
comparison
equal deleted inserted replaced
64220:38b6647b9ed4 64221:fab4526842b1
981 ;; settings of enabled themes that apply to it. 981 ;; settings of enabled themes that apply to it.
982 ;; Each face name has a `theme-face' property that describes all the 982 ;; Each face name has a `theme-face' property that describes all the
983 ;; settings of enabled themes that apply to it. 983 ;; settings of enabled themes that apply to it.
984 ;; The property value is a list of settings, each with the form 984 ;; The property value is a list of settings, each with the form
985 ;; (THEME MODE VALUE). THEME, MODE and VALUE are as above. 985 ;; (THEME MODE VALUE). THEME, MODE and VALUE are as above.
986 986 ;; Each of these lists is ordered by decreasing theme precedence.
987 ;; When a theme is disabled, its settings are removed from the 987 ;; Thus, the first element is always the one that is in effect.
988 ;; `theme-value' and `theme-face' properties, but the 988
989 ;; theme's own `theme-settings' property remains unchanged. 989 ;; Disabling a theme removes its settings from the `theme-value' and
990 ;; `theme-face' properties, but the theme's own `theme-settings'
991 ;; 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.
990 996
991 (defvar custom-loaded-themes nil 997 (defvar custom-loaded-themes nil
992 "Custom themes that have been loaded.") 998 "Custom themes that have been loaded.")
993 999
994 (defcustom custom-theme-directory 1000 (defcustom custom-theme-directory
1099 (spec-list (get symbol prop))) 1105 (spec-list (get symbol prop)))
1100 (put symbol prop (cons (cddr s) (assq-delete-all theme spec-list))) 1106 (put symbol prop (cons (cddr s) (assq-delete-all theme spec-list)))
1101 (if (eq prop 'theme-value) 1107 (if (eq prop 'theme-value)
1102 (custom-theme-recalc-variable symbol) 1108 (custom-theme-recalc-variable symbol)
1103 (custom-theme-recalc-face symbol))))) 1109 (custom-theme-recalc-face symbol)))))
1104 (push theme custom-enabled-themes) 1110 (push theme (delq theme custom-enabled-themes))
1105 ;; `user' must always be the highest-precedence enabled theme. 1111 ;; `user' must always be the highest-precedence enabled theme.
1106 (unless (eq theme 'user) 1112 (unless (eq theme 'user)
1107 (custom-enable-theme 'user))) 1113 (custom-enable-theme 'user)))
1108 1114
1109 (defun custom-disable-theme (theme) 1115 (defun custom-disable-theme (theme)