| 254 | | @defmac defcustom option default doc [keyword value]@dots{} |
|---|
| 255 | | Declare @var{option} as a customizable user option variable. Do not |
|---|
| 256 | | quote @var{option}. The argument @var{doc} specifies the documentation |
|---|
| 257 | | string for the variable. There is no need to start it with a @samp{*} |
|---|
| 258 | | because @code{defcustom} automatically marks @var{option} as a |
|---|
| 259 | | @dfn{user option} (@pxref{Defining Variables}). |
|---|
| 260 | | |
|---|
| 261 | | If @var{option} is void, @code{defcustom} initializes it to |
|---|
| 262 | | @var{default}. @var{default} should be an expression to compute the |
|---|
| 263 | | value; be careful in writing it, because it can be evaluated on more |
|---|
| 264 | | than one occasion. You should normally avoid using backquotes in |
|---|
| 265 | | @var{default} because they are not expanded when editing the value, |
|---|
| 266 | | causing list values to appear to have the wrong structure. |
|---|
| | 254 | @defmac defcustom option standard doc [keyword value]@dots{} |
|---|
| | 255 | This construct declares @var{option} as a customizable user option |
|---|
| | 256 | variable. You should not quote @var{option}. The argument @var{doc} |
|---|
| | 257 | specifies the documentation string for the variable. There is no need |
|---|
| | 258 | to start it with a @samp{*}, because @code{defcustom} automatically |
|---|
| | 259 | marks @var{option} as a @dfn{user option} (@pxref{Defining |
|---|
| | 260 | Variables}). |
|---|
| | 261 | |
|---|
| | 262 | The argument @var{standard} is an expression that specifies the |
|---|
| | 263 | standard value for @var{option}. Evaluating the @code{defcustom} form |
|---|
| | 264 | evaluates @var{standard}, but does not necessarily install the |
|---|
| | 265 | standard value. If @var{option} already has a default value, |
|---|
| | 266 | @code{defcustom} does not change it. If the user has saved a |
|---|
| | 267 | customization for @var{option}, @code{defcustom} installs the user's |
|---|
| | 268 | customized value as @var{option}'s default value. If neither of those |
|---|
| | 269 | cases applies, @code{defcustom} installs the result of evaluating |
|---|
| | 270 | @var{standard} as the default value. |
|---|
| | 271 | |
|---|
| | 272 | The expression @var{standard} can be evaluated at various other times, |
|---|
| | 273 | too---whenever the customization facility needs to know @var{option}'s |
|---|
| | 274 | standard value. So be sure to use an expression which is harmless to |
|---|
| | 275 | evaluate at any time. We recommend avoiding backquotes in |
|---|
| | 276 | @var{standard}, because they are not expanded when editing the value, |
|---|
| | 277 | so list values will appear to have the wrong structure. |
|---|