]> code.delx.au - gnu-emacs/commitdiff
* customize.texi (Custom Themes): Document custom-known-themes.
authorChong Yidong <cyd@gnu.org>
Wed, 18 Dec 2013 14:54:24 +0000 (22:54 +0800)
committerChong Yidong <cyd@gnu.org>
Wed, 18 Dec 2013 14:54:24 +0000 (22:54 +0800)
* custom.el (custom-available-themes): Doc fix.

Fixes: debbugs:15717
doc/lispref/ChangeLog
doc/lispref/customize.texi
lisp/ChangeLog
lisp/custom.el

index 07d153ed80e95f5ff7954583d48f15083f9c3546..af09f4371f990646b4c9153f7c5e775c2fb9783d 100644 (file)
@@ -1,5 +1,8 @@
 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).
 
index e9260309057e76d88f19a7cbcc9864faf0f364dd..e895fe34e53e5c44bf0c658392aee40c58aff35f 100644 (file)
@@ -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
index efb12d34d543a6900e9bc30e99c15386e0f1b40f..e8bd967c0f2cf2d0fe056aba94221e5bbfe4587d 100644 (file)
@@ -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).
index 1d00dda01685258bd6a6348beb5f5c6bc7ad7e33..43775a16911f80a424a6dc94cf2d962f064e9ca4 100644 (file)
@@ -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)