[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r107823: * doc/lispref/customize.t
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r107823: * doc/lispref/customize.texi (Custom Themes): Also document load-theme etc. |
Date: |
Fri, 13 Apr 2012 12:18:40 +0800 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 107823
committer: Chong Yidong <address@hidden>
branch nick: emacs-24
timestamp: Fri 2012-04-13 12:18:40 +0800
message:
* doc/lispref/customize.texi (Custom Themes): Also document load-theme etc.
modified:
doc/lispref/ChangeLog
doc/lispref/customize.texi
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog 2012-04-12 14:50:58 +0000
+++ b/doc/lispref/ChangeLog 2012-04-13 04:18:40 +0000
@@ -1,3 +1,7 @@
+2012-04-13 Chong Yidong <address@hidden>
+
+ * customize.texi (Custom Themes): Also document load-theme etc.
+
2012-04-12 Chong Yidong <address@hidden>
* customize.texi (Applying Customizations):
=== modified file 'doc/lispref/customize.texi'
--- a/doc/lispref/customize.texi 2012-04-12 14:50:58 +0000
+++ b/doc/lispref/customize.texi 2012-04-13 04:18:40 +0000
@@ -1330,14 +1330,14 @@
@defmac deftheme theme &optional doc
This macro declares @var{theme} (a symbol) as the name of a Custom
-theme. The optional argument @var{doc} specifies a string describing
+theme. The optional argument @var{doc} should be a string describing
the theme; this is the description shown when the user invokes the
address@hidden (@code{describe-theme}) command in the @samp{*Custom Themes*}
-buffer.
address@hidden command or types @kbd{?} in the @samp{*Custom
+Themes*} buffer.
-Two special theme names are disallowed: @code{user} is a ``dummy
-theme'' used to store the user's direct customization settings, and
address@hidden is a ``dummy theme'' used to store changes made outside
+Two special theme names are disallowed: @code{user} is a ``dummy''
+theme which stores the user's direct customization settings, and
address@hidden is a ``dummy'' theme which stores changes made outside
of the Customize system. If you specify either of these as the
@var{theme} argument, @code{deftheme} signals an error.
@end defmac
@@ -1347,15 +1347,15 @@
specified.
@end defmac
- In between @code{deftheme} and @code{provide-theme} are the Lisp
-forms specifying the theme settings---usually a call to
+ In between @code{deftheme} and @code{provide-theme} are Lisp forms
+specifying the theme settings: usually a call to
@code{custom-theme-set-variables} and/or a call to
address@hidden:
address@hidden
@defun custom-theme-set-variables theme &rest args
-This function declares that the Custom theme @var{theme} (a symbol)
-customizes the variables in @var{args}. Each argument in @var{args}
-should be a list of the form
+This function specifies the Custom theme @var{theme}'s variable
+settings. @var{theme} should be a symbol. Each argument in
address@hidden should be a list of the form
@example
(@var{var} @var{expression} address@hidden address@hidden address@hidden)
@@ -1367,9 +1367,9 @@
@end defun
@defun custom-theme-set-faces theme &rest args
-This function declares that the Custom theme @var{theme} (a symbol)
-customizes the faces in @var{args}. Each argument in @var{args}
-should be a list of the form
+This function specifies the Custom theme @var{theme}'s face settings.
address@hidden should be a symbol. Each argument in @var{args} should be
+a list of the form
@example
(@var{face} @var{spec} address@hidden address@hidden)
@@ -1380,7 +1380,43 @@
@code{custom-set-faces}. @xref{Applying Customizations}.
@end defun
- In principle, a theme file can also contain other Lisp forms, which
-would be evaluated when loading the theme; but it is ``bad form'' for
-a theme to do this. (For reasons of security, Emacs prompts the user
-before loading any non-built-in theme.)
+ In theory, a theme file can also contain other Lisp forms, which
+would be evaluated when loading the theme, but that is ``bad form''.
+To protect against loading themes containing malicious code, Emacs
+displays the source file and asks for confirmation from the user
+before loading any non-built-in theme for the first time.
+
+ The following functions are useful for programmatically enabling and
+disabling Custom themes:
+
address@hidden custom-theme-p theme
+This function return a address@hidden value if @var{theme} (a symbol)
+is the name of a Custom theme (i.e.@: a Custom theme which has been
+loaded into Emacs, whether or not the theme is enabled). Otherwise,
+it returns @code{nil}.
address@hidden defun
+
address@hidden 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
+variable @code{custom-theme-load-path}. @xref{Custom Themes,,, emacs,
+The GNU Emacs Manual}. It also @dfn{enables} the theme, causing its
+variable and face settings to take effect.
+
+If the optional argument @var{no-confirm} is address@hidden, this
+skips prompting the user for confirmation before loading the theme.
+
+If the optional argument @var{no-enable} is address@hidden, the theme
+is loaded but not enabled.
address@hidden deffn
+
address@hidden Command enable-theme theme
+This function enables the Custom theme named @var{theme}. It signals
+an error if no such theme has been loaded.
address@hidden deffn
+
address@hidden Command disable-theme theme
+This function disables the Custom theme named @var{theme}. The theme
+remains loaded, so that a subsequent call to @code{enable-theme} will
+re-enable it.
address@hidden deffn
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r107823: * doc/lispref/customize.texi (Custom Themes): Also document load-theme etc.,
Chong Yidong <=