From: Chong Yidong Date: Wed, 18 Dec 2013 14:54:24 +0000 (+0800) Subject: * customize.texi (Custom Themes): Document custom-known-themes. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~344 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=18874304db15434bbc2a9bcf28b71c86f6dc4bd8;p=emacs.git * customize.texi (Custom Themes): Document custom-known-themes. * custom.el (custom-available-themes): Doc fix. Fixes: debbugs:15717 --- diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 07d153ed80e..af09f4371f9 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,5 +1,8 @@ 2013-12-18 Chong Yidong + * 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). diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index e9260309057..e895fe34e53 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -1428,6 +1428,17 @@ loaded into Emacs, whether or not the theme is enabled). Otherwise, 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 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index efb12d34d54..e8bd967c0f2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -11,6 +11,7 @@ * 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). diff --git a/lisp/custom.el b/lisp/custom.el index 1d00dda0168..43775a16911 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1277,7 +1277,14 @@ NAME should be a symbol." (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)