1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-25 15:52:01 -07:00

* customize.texi (Custom Themes): Document custom-known-themes.

* custom.el (custom-available-themes): Doc fix.

Fixes: debbugs:15717
This commit is contained in:
Chong Yidong 2013-12-18 22:54:24 +08:00
parent b2984e39fc
commit 18874304db
4 changed files with 23 additions and 1 deletions

View 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).

View 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

View 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).

View 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)