The atoms are s-expressions that do not consist of other s-expressions. For example, a string, a file name, or a symbol are atoms, while a list is a composite type. You can edit the value of an atom with the widgets described in this section.
The syntax for all the atoms is:
type ::= (construct [keyword argument]... [ value ])
The value, if present, is used to initialize the :value
property and must be an expression of the same type as the widget.
That is, for example, the string widget can only be initialized with a
string.
All the atom widgets take the same keyword arguments as the
editable-field
widget. See The editable-field
Widget.
An editable field widget that can represent any Lisp string.
It offers completion via the ispell library and the :complete
property.
An editable field widget that can represent a regular expression.
Overrides the :match
and the :validate
properties to
check that the value is a valid regexp.
An editable field widget that can represent a character.
The character widget represents some characters (like the newline character) in a special manner, to make it easier for the user to see what’s the content of the character field.
A widget for editing file names.
Keywords:
:completions
Offers file name completion to the user.
:prompt-value
A function to read a file name from the minibuffer.
:must-match
If this is set to non-nil
, only existing file names are allowed
when prompting for a value in the minibuffer.
:match
The widget matches if the value is a string, and the file whose name
is that string is an existing file, or if :must-match
is
nil
.
:validate
The widget is valid if its value matches.
A widget for editing directory names.
Its super is the file
widget, and it overrides the
:completions
property, to offer completions only for
directories.
A widget for editing a Lisp symbol.
Its value by default is nil
.
A widget for editing a lambda expression, or a function name, offering
completion. Its super is the restricted-sexp
widget.
A widget for editing variable names, offering completion. Its super
is the symbol
widget.
A widget for editing integers in an editable field. Its super is the
restricted-sexp
widget.
It has a default :value
of 0.
A widget for editing non-negative integers. Its super is the
restricted-sexp
widget.
It has a default :value
of 0.
A widget for editing a floating point number. Its super is the
restricted-sexp
widget.
It has a default :value
of 0.0.
A widget for editing a number, either floating point or integer. Its
super is the restricted-sexp
widget.
It has a default :value
of 0.0.
A widget for editing a boolean value. Its super is the toggle
widget.
Its value may be nil
, meaning false, or non-nil
, meaning
true.
A widget to edit a color name.
In addition, shows a sample that shows the selected color, if any.
A widget useful as the last item in a choice
widget, since it
matches any value.
Its super is the sexp
widget, and its :value
is
other
, by default.
A widget that can represent a coding system name, offering
completions. See Coding Systems in the Emacs Lisp Reference
Manual. Its super is the symbol
widget.
It has a default value of undecided
.
A widget to represent a key sequence.
It uses a special keymap as the :keymap
.