summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Teirlinck <teirllm@auburn.edu>2005-07-14 01:07:23 +0000
committerLuc Teirlinck <teirllm@auburn.edu>2005-07-14 01:07:23 +0000
commitd4bf03f3735d39eefa79b1ef3c6a3c1a37f3ab90 (patch)
tree16b1ffb0a0868604ae492220e1c8ded6bdc45956
parent67aed0c6e4c63d7f9a3922d5e9359785d053f0fa (diff)
downloademacs-d4bf03f3735d39eefa79b1ef3c6a3c1a37f3ab90.tar.gz
(Variable Definitions): Add `custom-initialize-safe-set' and
`custom-initialize-safe-default'. `standard-value' is a list too. (Defining New Types): Use @key{RET} instead of @key{ret}.
-rw-r--r--lispref/customize.texi26
1 files changed, 21 insertions, 5 deletions
diff --git a/lispref/customize.texi b/lispref/customize.texi
index baaceae47f0..8ee82f088a8 100644
--- a/lispref/customize.texi
+++ b/lispref/customize.texi
@@ -12,7 +12,7 @@ and also customization groups for classifying them. We use the term
definitions---as well as face definitions (@pxref{Defining Faces}).
@menu
-* Common Keywords:: Common keyword arguments for all kinds of
+* Common Keywords:: Common keyword arguments for all kinds of
customization declarations.
* Group Definitions:: Writing customization group definitions.
* Variable Definitions:: Declaring user options.
@@ -270,6 +270,22 @@ This is the default @code{:initialize} function.
Use the @code{:set} function to initialize the variable, if it is
already set or has been customized; otherwise, just use
@code{set-default}.
+
+@item custom-initialize-safe-set
+@itemx custom-initialize-safe-default
+These functions behave like @code{custom-initialize-set}
+(@code{custom-initialize-default}, respectively), but catch errors.
+If an error occurs during initialization, they set the variable to
+@code{nil} using @code{set-default}, and throw no error.
+
+These two functions are only meant for options defined in pre-loaded
+files, where some variables or functions used to compute the option's
+value may not yet be defined. The option normally gets updated in
+@file{startup.el}, ignoring the previously computed value. Because of
+this typical usage, the value which these two functions compute
+normally only matters when, after startup, one unsets the option's
+value and then reevaluates the defcustom. By that time, the necessary
+variables and functions will be defined, so there will not be an error.
@end table
@item :set-after @var{variables}
@@ -318,8 +334,8 @@ type of @var{symbol}.
Internally, @code{defcustom} uses the symbol property
@code{standard-value} to record the expression for the default value,
and @code{saved-value} to record the value saved by the user with the
-customization buffer. The @code{saved-value} property is actually a
-list whose car is an expression which evaluates to the value.
+customization buffer. Both properties are actually lists whose car is
+an expression which evaluates to the value.
@node Customization Types
@section Customization Types
@@ -1088,8 +1104,8 @@ widget. For the purpose of defining new customization types, the
argument with the same syntax as the keyword argument to
@code{defcustom} with the same name. The third argument is a
documentation string for the new widget. You will be able to see that
-string with the @kbd{M-x widget-browse @key{ret} binary-tree-of-string
-@key{ret}} command.
+string with the @kbd{M-x widget-browse @key{RET} binary-tree-of-string
+@key{RET}} command.
After these mandatory arguments follow the keyword arguments. The most
important is @code{:type}, which describes the data type we want to match