aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2013-12-18 22:54:24 +0800
committerChong Yidong2013-12-18 22:54:24 +0800
commit18874304db15434bbc2a9bcf28b71c86f6dc4bd8 (patch)
tree04449208d9aee204721abc8754054cd92cb26f9b
parentb2984e39fcacc5acc5c1d74029505cba3f040196 (diff)
downloademacs-18874304db15434bbc2a9bcf28b71c86f6dc4bd8.tar.gz
emacs-18874304db15434bbc2a9bcf28b71c86f6dc4bd8.zip
* customize.texi (Custom Themes): Document custom-known-themes.
* custom.el (custom-available-themes): Doc fix. Fixes: debbugs:15717
-rw-r--r--doc/lispref/ChangeLog3
-rw-r--r--doc/lispref/customize.texi11
-rw-r--r--lisp/ChangeLog1
-rw-r--r--lisp/custom.el9
4 files changed, 23 insertions, 1 deletions
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 @@
12013-12-18 Chong Yidong <cyd@gnu.org> 12013-12-18 Chong Yidong <cyd@gnu.org>
2 2
3 * customize.texi (Custom Themes): Document custom-known-themes
4 (Bug#15717).
5
3 * modes.texi (Defining Minor Modes): Fix typo (Bug#14874). 6 * modes.texi (Defining Minor Modes): Fix typo (Bug#14874).
4 (Keymaps and Minor Modes): Fix binding convention (Bug#11522). 7 (Keymaps and Minor Modes): Fix binding convention (Bug#11522).
5 8
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,
1428it returns @code{nil}. 1428it returns @code{nil}.
1429@end defun 1429@end defun
1430 1430
1431@defvar custom-known-themes
1432The value of this variable is a list of themes loaded into Emacs.
1433Each theme is represented by a Lisp symbol (the theme name). The
1434default value of this variable is a list containing two ``dummy''
1435themes: @code{(user changed)}. The @code{changed} theme stores
1436settings made before any Custom themes are applied (e.g., variables
1437set outside of Customize). The @code{user} theme stores settings the
1438user has customized and saved. Any additional themes declared with
1439the @code{deftheme} macro are added to the front of this list.
1440@end defvar
1441
1431@deffn Command load-theme theme &optional no-confirm no-enable 1442@deffn Command load-theme theme &optional no-confirm no-enable
1432This function loads the Custom theme named @var{theme} from its source 1443This function loads the Custom theme named @var{theme} from its source
1433file, looking for the source file in the directories specified by the 1444file, 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 @@
11 * custom.el (custom-push-theme): If custom--inhibit-theme-enable 11 * custom.el (custom-push-theme): If custom--inhibit-theme-enable
12 is non-nil, do not create a new entry in the symbol's theme-value 12 is non-nil, do not create a new entry in the symbol's theme-value
13 or theme-face property; update theme-settings only (Bug#14664). 13 or theme-face property; update theme-settings only (Bug#14664).
14 (custom-available-themes): Doc fix.
14 15
15 * cus-theme.el (custom-new-theme-mode-map): Add bindings 16 * cus-theme.el (custom-new-theme-mode-map): Add bindings
16 (Bug#15674). 17 (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."
1277 (eq name 'changed))))) 1277 (eq name 'changed)))))
1278 1278
1279(defun custom-available-themes () 1279(defun custom-available-themes ()
1280 "Return a list of available Custom themes (symbols)." 1280 "Return a list of Custom themes available for loading.
1281Search the directories specified by `custom-theme-load-path' for
1282files named FOO-theme.el, and return a list of FOO symbols.
1283
1284The returned symbols may not correspond to themes that have been
1285loaded, and no effort is made to check that the files contain
1286valid Custom themes. For a list of loaded themes, check the
1287variable `custom-known-themes'."
1281 (let (sym themes) 1288 (let (sym themes)
1282 (dolist (dir (custom-theme--load-path)) 1289 (dolist (dir (custom-theme--load-path))
1283 (when (file-directory-p dir) 1290 (when (file-directory-p dir)