[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

14.4 Customization Types

When you define a user option with defcustom, you must specify its customization type. That is a Lisp object which describes (1) which values are legitimate and (2) how to display the value in the customization buffer for editing.

You specify the customization type in defcustom with the :type keyword. The argument of :type is evaluated; since types that vary at run time are rarely useful, normally you use a quoted constant. For example:

 
(defcustom diff-command "diff"
  "*The command to use to run diff."
  :type '(string)
  :group 'diff)

In general, a customization type is a list whose first element is a symbol, one of the customization type names defined in the following sections. After this symbol come a number of arguments, depending on the symbol. Between the type symbol and its arguments, you can optionally write keyword-value pairs (see section 14.4.4 Type Keywords).

Some of the type symbols do not use any arguments; those are called simple types. For a simple type, if you do not use any keyword-value pairs, you can omit the parentheses around the type symbol. For example just string as a customization type is equivalent to (string).

14.4.1 Simple Types  
14.4.2 Composite Types  
14.4.3 Splicing into Lists  
14.4.4 Type Keywords  



This document was generated on May 2, 2002 using texi2html