121 |
`standard-value'. At the same time, SYMBOL's property `force-value' is |
`standard-value'. At the same time, SYMBOL's property `force-value' is |
122 |
set to nil, as the value is no longer rogue." |
set to nil, as the value is no longer rogue." |
123 |
;; Remember the standard setting. The value should be in the standard |
;; Remember the standard setting. The value should be in the standard |
124 |
;; theme, not in this property. However, his would require changeing |
;; theme, not in this property. However, this would require changing |
125 |
;; the C source of defvar and others as well... |
;; the C source of defvar and others as well... |
126 |
(put symbol 'standard-value (list default)) |
(put symbol 'standard-value (list default)) |
127 |
;; Maybe this option was rogue in an earlier version. It no longer is. |
;; Maybe this option was rogue in an earlier version. It no longer is. |
560 |
(t (condition-case nil (load load) (error nil)))))))) |
(t (condition-case nil (load load) (error nil)))))))) |
561 |
|
|
562 |
(defvar custom-known-themes '(user standard) |
(defvar custom-known-themes '(user standard) |
563 |
"Themes that have been define with `deftheme'. |
"Themes that have been defined with `deftheme'. |
564 |
The default value is the list (user standard). The theme `standard' |
The default value is the list (user standard). The theme `standard' |
565 |
contains the Emacs standard settings from the original Lisp files. The |
contains the Emacs standard settings from the original Lisp files. The |
566 |
theme `user' contains all the the settings the user customized and saved. |
theme `user' contains all the the settings the user customized and saved. |
926 |
(defvar custom-loaded-themes nil |
(defvar custom-loaded-themes nil |
927 |
"Themes in the order they are loaded.") |
"Themes in the order they are loaded.") |
928 |
|
|
929 |
|
(defcustom custom-theme-directory |
930 |
|
(if (eq system-type 'ms-dos) |
931 |
|
;; MS-DOS cannot have initial dot. |
932 |
|
"~/_emacs.d/" |
933 |
|
"~/.emacs.d/") |
934 |
|
"Directory in which Custom theme files should be written. |
935 |
|
`require-theme' searches this directory in addition to load-path. |
936 |
|
The command `customize-create-theme' writes the files it produces |
937 |
|
into this directory." |
938 |
|
:type 'string |
939 |
|
:group 'customize |
940 |
|
:version "22.1") |
941 |
|
|
942 |
(defun custom-theme-loaded-p (theme) |
(defun custom-theme-loaded-p (theme) |
943 |
"Return non-nil when THEME has been loaded." |
"Return non-nil when THEME has been loaded." |
944 |
(memq theme custom-loaded-themes)) |
(memq theme custom-loaded-themes)) |
962 |
by `custom-make-theme-feature'." |
by `custom-make-theme-feature'." |
963 |
;; Note we do no check for validity of the theme here. |
;; Note we do no check for validity of the theme here. |
964 |
;; This allows to pull in themes by a file-name convention |
;; This allows to pull in themes by a file-name convention |
965 |
(require (or (get theme 'theme-feature) |
(let ((load-path (if (file-directory-p custom-theme-directory) |
966 |
(custom-make-theme-feature theme)))) |
(cons custom-theme-directory load-path) |
967 |
|
load-path))) |
968 |
|
(require (or (get theme 'theme-feature) |
969 |
|
(custom-make-theme-feature theme))))) |
970 |
|
|
971 |
(defun custom-remove-theme (spec-alist theme) |
(defun custom-remove-theme (spec-alist theme) |
972 |
"Delete all elements from SPEC-ALIST whose car is THEME." |
"Delete all elements from SPEC-ALIST whose car is THEME." |