diff options
| author | Richard M. Stallman | 2002-10-07 22:30:45 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-10-07 22:30:45 +0000 |
| commit | 7db0894f9541bd271fc7e7083502a2fffa941c53 (patch) | |
| tree | ea1e39b1e85a0a93ebbcf37c06746ab0373ceb0e | |
| parent | bfde2673662f0af592d6de0ed2b3f0809e0fd70c (diff) | |
| download | emacs-7db0894f9541bd271fc7e7083502a2fffa941c53.tar.gz emacs-7db0894f9541bd271fc7e7083502a2fffa941c53.zip | |
(Variable Definitions): Update info on :get and default :initialize function.
| -rw-r--r-- | lispref/customize.texi | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/lispref/customize.texi b/lispref/customize.texi index 61891fba651..4997fc4479a 100644 --- a/lispref/customize.texi +++ b/lispref/customize.texi | |||
| @@ -242,9 +242,15 @@ as a Lisp variable). The default for @var{setfunction} is | |||
| 242 | @item :get @var{getfunction} | 242 | @item :get @var{getfunction} |
| 243 | Specify @var{getfunction} as the way to extract the value of this | 243 | Specify @var{getfunction} as the way to extract the value of this |
| 244 | option. The function @var{getfunction} should take one argument, a | 244 | option. The function @var{getfunction} should take one argument, a |
| 245 | symbol, and should return the ``current value'' for that symbol (which | 245 | symbol, and should return whatever customize should use as the |
| 246 | need not be the symbol's Lisp value). The default is | 246 | ``current value'' for that symbol (which need not be the symbol's Lisp |
| 247 | @code{default-value}. | 247 | value). The default is @code{default-value}. |
| 248 | |||
| 249 | You have to really understand the workings of Custom to use | ||
| 250 | @code{:get} correctly. It is meant for values that are treated in | ||
| 251 | Custom as variables but are not actually stored in Lisp variables. It | ||
| 252 | is almost surely a mistake to specify @code{getfunction} for a value | ||
| 253 | that really is stored in a Lisp variable. | ||
| 248 | 254 | ||
| 249 | @item :initialize @var{function} | 255 | @item :initialize @var{function} |
| 250 | @var{function} should be a function used to initialize the variable when | 256 | @var{function} should be a function used to initialize the variable when |
| @@ -255,8 +261,7 @@ this way: | |||
| 255 | @table @code | 261 | @table @code |
| 256 | @item custom-initialize-set | 262 | @item custom-initialize-set |
| 257 | Use the variable's @code{:set} function to initialize the variable, but | 263 | Use the variable's @code{:set} function to initialize the variable, but |
| 258 | do not reinitialize it if it is already non-void. This is the default | 264 | do not reinitialize it if it is already non-void. |
| 259 | @code{:initialize} function. | ||
| 260 | 265 | ||
| 261 | @item custom-initialize-default | 266 | @item custom-initialize-default |
| 262 | Like @code{custom-initialize-set}, but use the function | 267 | Like @code{custom-initialize-set}, but use the function |
| @@ -267,9 +272,10 @@ defining the variable will not call the minor mode function, but | |||
| 267 | customizing the variable will do so. | 272 | customizing the variable will do so. |
| 268 | 273 | ||
| 269 | @item custom-initialize-reset | 274 | @item custom-initialize-reset |
| 270 | Always use the @code{:set} function to initialize the variable. If the | 275 | Always use the @code{:set} function to initialize the variable. If |
| 271 | variable is already non-void, reset it by calling the @code{:set} | 276 | the variable is already non-void, reset it by calling the @code{:set} |
| 272 | function using the current value (returned by the @code{:get} method). | 277 | function using the current value (returned by the @code{:get} method). |
| 278 | This is the default @code{:initialize} function. | ||
| 273 | 279 | ||
| 274 | @item custom-initialize-changed | 280 | @item custom-initialize-changed |
| 275 | Use the @code{:set} function to initialize the variable, if it is | 281 | Use the @code{:set} function to initialize the variable, if it is |