Next: , Previous: , Up: Basic Types   [Contents]


5.5 The editable-field Widget

Syntax:

TYPE ::= (editable-field [KEYWORD ARGUMENT]... [ VALUE ])

The value, if present, is used to initialize the :value property. The value should be a string, which will be inserted in field. This widget will match all string values.

The following extra properties are recognized.

:size

The minimum width of the editable field.
By default the field will reach to the end of the line. If the content is too large, the displayed representation will expand to contain it. The content is not truncated to size.

:value-face

Face used for highlighting the editable field. Default is widget-field-face.

:secret

Character used to display the value. You can set this to e.g. ?* if the field contains a password or other secret information. By default, the value is not secret.

:valid-regexp

By default the :validate function will match the content of the field with the value of this attribute. The default value is "" which matches everything.

:keymap

Keymap used in the editable field. The default value is widget-field-keymap, which allows you to use all the normal editing commands, even if the buffer’s major mode suppress some of them. Pressing return invokes the function specified by :action.