Customization options are organized into groups. Each group has a name
and contains a set of related options. Groups can be assigned to
parent groups using the :group parameter during construction.
| defgroup group real-name &rest keys | Macro |
|
Declares a new customization group whose name is defined by the symbol
group. The string real-name is the title of the group as
seen by the user.
keys is a list, defining the properties of the group. The members of the list are grouped into pairs of elements, the first element names the property, the second defines its value.
This macro also creates an interactive function named
While |
| defcustom variable value documentation &rest keys | Macro |
The first three arguments are analogous to the defvar special
form, they declare a special variable stored in the symbol
variable, whose value is set to value if the variable is
currently unbound, with a documentation string documentation.
All other parameters are key-value pairs as with
Except where specified, the values of these keys are not evaluated.
While |
Note that where necessary the types themselves define default
:set, :get and :widget values that may be
overridden by values in the defcustom call. Usually, however,
this will not be necessary.
Consider the following example:
(defgroup move "Move/Resize")
(defcustom move-outline-mode 'opaque
"The method of drawing windows being moved interactively."
:type (set opaque box)
:group move)
(defcustom move-snap-epsilon 8
"Proximity in pixels before snapping to a window edge."
:group move
:type (number 0 64))
This defines a group and two customization options.
There are two special accessor functions to make it easier to deal with lists of allowed symbols.
| custom-add-option variable option | Function |
| Add symbol value option to the list of symbols that can be stored in variable. The new option goes on the end of the list. |
| custom-get-options variable | Function |
| Return the list of symbols that can be stored in variable. |