Mercurial > emacs
changeset 48585:be738e9c1a09
Explain about ordering of alternatives in `choice'.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 29 Nov 2002 15:12:21 +0000 |
parents | 033e93594b23 |
children | 1f75262039c7 |
files | lispref/customize.texi |
diffstat | 1 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lispref/customize.texi Fri Nov 29 15:11:13 2002 +0000 +++ b/lispref/customize.texi Fri Nov 29 15:12:21 2002 +0000 @@ -661,6 +661,19 @@ a @code{const}, you should specify a valid default for that alternative using the @code{:value} keyword. @xref{Type Keywords}. +If some values are covered by more than one of the alternatives, +customize will choose the first alternative that the value fits. This +means you should always list the most specific types first, and the +most general last. Here's an example of proper usage: + +@example +(choice (const :tag "Off" nil) symbol (sexp :tag "Other")) +@end example + +@noindent +This way, the special value @code{nil} is not treated like other +symbols, and symbols are not treated like other Lisp expressions. + @item (radio @var{element-types}@dots{}) This is similar to @code{choice}, except that the choices are displayed using `radio buttons' rather than a menu. This has the advantage of