summaryrefslogtreecommitdiff
path: root/doc/lispref/customize.texi
diff options
context:
space:
mode:
authorPhilip Kaludercic <philipk@posteo.net>2022-09-17 20:11:42 +0200
committerPhilip Kaludercic <philipk@posteo.net>2022-10-15 17:22:48 +0200
commitda2e6da72296ed6211b8047ccdc42fccab6f1b31 (patch)
tree60c8d9a93250bbd7e8de5072a4da79adbadf0fcb /doc/lispref/customize.texi
parent9fcd59a97820e5154e678be8b98fe0cac4e4546e (diff)
downloademacs-da2e6da72296ed6211b8047ccdc42fccab6f1b31.tar.gz
Tag themes with properties
* doc/emacs/custom.texi (Custom Themes): Document 'theme-choose-variant'. * doc/lispref/customize.texi (Custom Themes): Document the new optional argument to 'deftheme'. (Autoload): Mention that 'deftheme' is not copied verbatim. * etc/themes/adwaita-theme.el (adwaita): Add properties. * etc/themes/deeper-blue-theme.el (deeper-blue): Add properties. * etc/themes/dichromacy-theme.el (dichromacy): Add properties. * etc/themes/light-blue-theme.el (light-blue): Add properties. * etc/themes/manoj-dark-theme.el (manoj-dark): Add properties. * etc/themes/misterioso-theme.el (misterioso): Add properties. * etc/themes/tango-dark-theme.el (tango-dark): Add properties. * etc/themes/tango-theme.el (tango): Add properties. * etc/themes/tsdh-dark-theme.el (tsdh-dark): Add properties. * etc/themes/tsdh-light-theme.el (tsdh-light): Add properties. * etc/themes/wheatgrass-theme.el (wheatgrass): Add properties. * etc/themes/whiteboard-theme.el (whiteboard): Add properties. * etc/themes/wombat-theme.el (wombat): Add properties. * etc/themes/modus-operandi-theme.el: Add properties. * etc/themes/modus-vivendi-theme.el: Add properties. * etc/themes/leuven-dark-theme.el (leuven-dark): Add properties. * etc/themes/leuven-theme.el (leuven): Add properties. * lisp/custom.el (deftheme): Allow for optional arguments to set the property list. (custom-declare-theme): Accept the same optional arguments as 'deftheme'. (theme-list-variants): Add new function. (theme-choose-variant): Add new command for switching between members of a theme family. (toggle-theme): Add an alias for 'theme-choose-variant'. * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload): Handle 'defcustom's by extracting the properties. (Bug#57639)
Diffstat (limited to 'doc/lispref/customize.texi')
-rw-r--r--doc/lispref/customize.texi24
1 files changed, 22 insertions, 2 deletions
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi
index 6ba35cffffe..204719e942b 100644
--- a/doc/lispref/customize.texi
+++ b/doc/lispref/customize.texi
@@ -1428,12 +1428,32 @@ emacs, The GNU Emacs Manual}.)
be a call to @code{deftheme}, and the last form should be a call to
@code{provide-theme}.
-@defmac deftheme theme &optional doc
+@defmac deftheme theme &optional doc &rest properties
This macro declares @var{theme} (a symbol) as the name of a Custom
theme. The optional argument @var{doc} should be a string describing
the theme; this is the description shown when the user invokes the
@code{describe-theme} command or types @kbd{?} in the @samp{*Custom
-Themes*} buffer.
+Themes*} buffer. The remaining arguments @var{properties} are used
+pass a property list with theme attributes.
+
+The following attributes are supported:
+
+@table @code
+@item :family
+A symbol designating what ``family'' a theme belongs to. A
+@dfn{family} of themes is a set of similar themes that differ by minor
+aspects, such as face colors that are meant for the light vs dark
+background of the frame.
+@item :kind
+A symbol. If a theme is enabled and this property has the value
+@code{color-scheme}, then the @code{theme-choose-variant} command will
+look for other available themes that belong to the same family in
+order to switch the themes. Other values are currently unspecified
+and should not be used.
+@item :background-mode
+A symbol, either @code{light} or @code{dark}. This attribute is
+currently unused, but should still be specified.
+@end table
Two special theme names are disallowed (using them causes an error):
@code{user} is a dummy theme that stores the user's direct