Mercurial > emacs
comparison lispref/customize.texi @ 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 | cd3ad87f8d7a |
children | 7edccee41a2a |
comparison
equal
deleted
inserted
replaced
48584:033e93594b23 | 48585:be738e9c1a09 |
---|---|
659 | 659 |
660 In any alternative for which @code{nil} is not a valid value, other than | 660 In any alternative for which @code{nil} is not a valid value, other than |
661 a @code{const}, you should specify a valid default for that alternative | 661 a @code{const}, you should specify a valid default for that alternative |
662 using the @code{:value} keyword. @xref{Type Keywords}. | 662 using the @code{:value} keyword. @xref{Type Keywords}. |
663 | 663 |
664 If some values are covered by more than one of the alternatives, | |
665 customize will choose the first alternative that the value fits. This | |
666 means you should always list the most specific types first, and the | |
667 most general last. Here's an example of proper usage: | |
668 | |
669 @example | |
670 (choice (const :tag "Off" nil) symbol (sexp :tag "Other")) | |
671 @end example | |
672 | |
673 @noindent | |
674 This way, the special value @code{nil} is not treated like other | |
675 symbols, and symbols are not treated like other Lisp expressions. | |
676 | |
664 @item (radio @var{element-types}@dots{}) | 677 @item (radio @var{element-types}@dots{}) |
665 This is similar to @code{choice}, except that the choices are displayed | 678 This is similar to @code{choice}, except that the choices are displayed |
666 using `radio buttons' rather than a menu. This has the advantage of | 679 using `radio buttons' rather than a menu. This has the advantage of |
667 displaying documentation for the choices when applicable and so is often | 680 displaying documentation for the choices when applicable and so is often |
668 a good choice for a choice between constant functions | 681 a good choice for a choice between constant functions |