aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2005-07-14 01:07:23 +0000
committerLuc Teirlinck2005-07-14 01:07:23 +0000
commitd5b3141dac8211b99290cb25299c0e77673038d1 (patch)
treebd4d328bcc8c5dd4ab9c7bcb6d8fd194e0c43444
parentfd90b80c174c9736f0ebc0a1dcaa08ae2d7dae87 (diff)
downloademacs-d5b3141dac8211b99290cb25299c0e77673038d1.tar.gz
emacs-d5b3141dac8211b99290cb25299c0e77673038d1.zip
(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
12definitions---as well as face definitions (@pxref{Defining Faces}). 12definitions---as well as face definitions (@pxref{Defining Faces}).
13 13
14@menu 14@menu
15* Common Keywords:: Common keyword arguments for all kinds of 15* Common Keywords:: Common keyword arguments for all kinds of
16 customization declarations. 16 customization declarations.
17* Group Definitions:: Writing customization group definitions. 17* Group Definitions:: Writing customization group definitions.
18* Variable Definitions:: Declaring user options. 18* Variable Definitions:: Declaring user options.
@@ -270,6 +270,22 @@ This is the default @code{:initialize} function.
270Use the @code{:set} function to initialize the variable, if it is 270Use the @code{:set} function to initialize the variable, if it is
271already set or has been customized; otherwise, just use 271already set or has been customized; otherwise, just use
272@code{set-default}. 272@code{set-default}.
273
274@item custom-initialize-safe-set
275@itemx custom-initialize-safe-default
276These functions behave like @code{custom-initialize-set}
277(@code{custom-initialize-default}, respectively), but catch errors.
278If an error occurs during initialization, they set the variable to
279@code{nil} using @code{set-default}, and throw no error.
280
281These two functions are only meant for options defined in pre-loaded
282files, where some variables or functions used to compute the option's
283value may not yet be defined. The option normally gets updated in
284@file{startup.el}, ignoring the previously computed value. Because of
285this typical usage, the value which these two functions compute
286normally only matters when, after startup, one unsets the option's
287value and then reevaluates the defcustom. By that time, the necessary
288variables and functions will be defined, so there will not be an error.
273@end table 289@end table
274 290
275@item :set-after @var{variables} 291@item :set-after @var{variables}
@@ -318,8 +334,8 @@ type of @var{symbol}.
318Internally, @code{defcustom} uses the symbol property 334Internally, @code{defcustom} uses the symbol property
319@code{standard-value} to record the expression for the default value, 335@code{standard-value} to record the expression for the default value,
320and @code{saved-value} to record the value saved by the user with the 336and @code{saved-value} to record the value saved by the user with the
321customization buffer. The @code{saved-value} property is actually a 337customization buffer. Both properties are actually lists whose car is
322list whose car is an expression which evaluates to the value. 338an expression which evaluates to the value.
323 339
324@node Customization Types 340@node Customization Types
325@section Customization Types 341@section Customization Types
@@ -1088,8 +1104,8 @@ widget. For the purpose of defining new customization types, the
1088argument with the same syntax as the keyword argument to 1104argument with the same syntax as the keyword argument to
1089@code{defcustom} with the same name. The third argument is a 1105@code{defcustom} with the same name. The third argument is a
1090documentation string for the new widget. You will be able to see that 1106documentation string for the new widget. You will be able to see that
1091string with the @kbd{M-x widget-browse @key{ret} binary-tree-of-string 1107string with the @kbd{M-x widget-browse @key{RET} binary-tree-of-string
1092@key{ret}} command. 1108@key{RET}} command.
1093 1109
1094After these mandatory arguments follow the keyword arguments. The most 1110After these mandatory arguments follow the keyword arguments. The most
1095important is @code{:type}, which describes the data type we want to match 1111important is @code{:type}, which describes the data type we want to match