diff options
| author | Dave Love | 2001-01-02 23:23:24 +0000 |
|---|---|---|
| committer | Dave Love | 2001-01-02 23:23:24 +0000 |
| commit | 4577e8cc563ba1283871d6aeaa3d0915a660bcb2 (patch) | |
| tree | f9a27ecad2a85825dcc6769e21df47ace65d72c7 /lispref | |
| parent | 9fbe132705339bc94121853b7bc9ec837286109c (diff) | |
| download | emacs-4577e8cc563ba1283871d6aeaa3d0915a660bcb2.tar.gz emacs-4577e8cc563ba1283871d6aeaa3d0915a660bcb2.zip | |
Add `radio' type. User variable doc strings and backquote in
defcustom.
Diffstat (limited to 'lispref')
| -rw-r--r-- | lispref/customize.texi | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/lispref/customize.texi b/lispref/customize.texi index 2ce5f5ed4ae..da202b83142 100644 --- a/lispref/customize.texi +++ b/lispref/customize.texi | |||
| @@ -177,17 +177,22 @@ turn this feature back on, if someone would like to do the work. | |||
| 177 | 177 | ||
| 178 | Use @code{defcustom} to declare user-editable variables. | 178 | Use @code{defcustom} to declare user-editable variables. |
| 179 | 179 | ||
| 180 | @defmac defcustom option default doc [keyword value]... | 180 | @defmac defcustom option default doc [keyword value]@dots{} |
| 181 | Declare @var{option} as a customizable user option variable. Do not | 181 | Declare @var{option} as a customizable user option variable. Do not |
| 182 | quote @var{option}. The argument @var{doc} specifies the documentation | 182 | quote @var{option}. The argument @var{doc} specifies the documentation |
| 183 | string for the variable; it should normally start with a @samp{*}. This | 183 | string for the variable. It should often start with a @samp{*} to mark |
| 184 | marks the variable, for other purposes, as one that users may want to | 184 | it as a @dfn{user option} (@pxref{Defining Variables}). Do not start |
| 185 | customize. | 185 | the documentation string with @samp{*} for options which cannot or |
| 186 | normally should not be set with @code{set-variable}; examples of the | ||
| 187 | former are global minor mode options such as | ||
| 188 | @code{global-font-lock-mode} and examples of the latter are hooks. | ||
| 186 | 189 | ||
| 187 | If @var{option} is void, @code{defcustom} initializes it to | 190 | If @var{option} is void, @code{defcustom} initializes it to |
| 188 | @var{default}. @var{default} should be an expression to compute the | 191 | @var{default}. @var{default} should be an expression to compute the |
| 189 | value; be careful in writing it, because it can be evaluated on more | 192 | value; be careful in writing it, because it can be evaluated on more |
| 190 | than one occasion. | 193 | than one occasion. You should normally avoid using backquotes in |
| 194 | @var{default} because they are not expanded when editing the value, | ||
| 195 | causing list values to appear to have the wrong structure. | ||
| 191 | 196 | ||
| 192 | When you evaluate a @code{defcustom} form with @kbd{C-M-x} in Emacs Lisp | 197 | When you evaluate a @code{defcustom} form with @kbd{C-M-x} in Emacs Lisp |
| 193 | mode (@code{eval-defun}), a special feature of @code{eval-defun} | 198 | mode (@code{eval-defun}), a special feature of @code{eval-defun} |
| @@ -632,7 +637,7 @@ separately, according to the type specified for it. | |||
| 632 | Like @code{list} except that the value must be a vector instead of a | 637 | Like @code{list} except that the value must be a vector instead of a |
| 633 | list. The elements work the same as in @code{list}. | 638 | list. The elements work the same as in @code{list}. |
| 634 | 639 | ||
| 635 | @item (choice @var{alternative-types}...) | 640 | @item (choice @var{alternative-types}@dots{}) |
| 636 | The value must fit at least one of @var{alternative-types}. | 641 | The value must fit at least one of @var{alternative-types}. |
| 637 | For example, @code{(choice integer string)} allows either an | 642 | For example, @code{(choice integer string)} allows either an |
| 638 | integer or a string. | 643 | integer or a string. |
| @@ -659,6 +664,13 @@ In any alternative for which @code{nil} is not a valid value, other than | |||
| 659 | a @code{const}, you should specify a valid default for that alternative | 664 | a @code{const}, you should specify a valid default for that alternative |
| 660 | using the @code{:value} keyword. @xref{Type Keywords}. | 665 | using the @code{:value} keyword. @xref{Type Keywords}. |
| 661 | 666 | ||
| 667 | @item (radio @var{element-types}@dots{}) | ||
| 668 | This is similar to @code{choice}, except that the choices are displayed | ||
| 669 | using `radio buttons' rather than a menu. This has the advantage of | ||
| 670 | displaying documentation for the choices when applicable and so is often | ||
| 671 | a good choice for a choice between constant functions | ||
| 672 | (@code{function-item} customization types). | ||
| 673 | |||
| 662 | @item (const @var{value}) | 674 | @item (const @var{value}) |
| 663 | The value must be @var{value}---nothing else is allowed. | 675 | The value must be @var{value}---nothing else is allowed. |
| 664 | 676 | ||