* custom.el (custom-available-themes): Doc fix.
Fixes: debbugs:15717
2013-12-18 Chong Yidong <cyd@gnu.org>
+ * customize.texi (Custom Themes): Document custom-known-themes
+ (Bug#15717).
+
* modes.texi (Defining Minor Modes): Fix typo (Bug#14874).
(Keymaps and Minor Modes): Fix binding convention (Bug#11522).
it returns @code{nil}.
@end defun
+@defvar custom-known-themes
+The value of this variable is a list of themes loaded into Emacs.
+Each theme is represented by a Lisp symbol (the theme name). The
+default value of this variable is a list containing two ``dummy''
+themes: @code{(user changed)}. The @code{changed} theme stores
+settings made before any Custom themes are applied (e.g., variables
+set outside of Customize). The @code{user} theme stores settings the
+user has customized and saved. Any additional themes declared with
+the @code{deftheme} macro are added to the front of this list.
+@end defvar
+
@deffn Command load-theme theme &optional no-confirm no-enable
This function loads the Custom theme named @var{theme} from its source
file, looking for the source file in the directories specified by the
* custom.el (custom-push-theme): If custom--inhibit-theme-enable
is non-nil, do not create a new entry in the symbol's theme-value
or theme-face property; update theme-settings only (Bug#14664).
+ (custom-available-themes): Doc fix.
* cus-theme.el (custom-new-theme-mode-map): Add bindings
(Bug#15674).
(eq name 'changed)))))
(defun custom-available-themes ()
- "Return a list of available Custom themes (symbols)."
+ "Return a list of Custom themes available for loading.
+Search the directories specified by `custom-theme-load-path' for
+files named FOO-theme.el, and return a list of FOO symbols.
+
+The returned symbols may not correspond to themes that have been
+loaded, and no effort is made to check that the files contain
+valid Custom themes. For a list of loaded themes, check the
+variable `custom-known-themes'."
(let (sym themes)
(dolist (dir (custom-theme--load-path))
(when (file-directory-p dir)