Data File Format Top Format Description
The Forms mode control file serves two purposes. First, it names the data file to use, and defines its format and properties. Second, the Emacs buffer it occupies is used by Forms mode to display the forms.
The contents of the control file are evaluated as a Lisp program. It should set the following Lisp variables to suitable values:
forms-file
|
This variable specifies the name of the data file. Example:
If the control file doesn't set |
forms-format-list
|
This variable describes the way the fields of the record are formatted on the screen. For details, see Format Description. |
forms-number-of-fields
|
This variable holds the number of fields in each record of the data file. Example:
|
If the control file does not set forms-format-list
a default
format is used. In this situation, Forms mode will deduce the number of
fields from the data file providing this file exists and
forms-number-of-records
has not been set in the control file.
The control file can optionally set the following additional Forms mode variables. Most of them have default values that are good for most applications.
forms-field-sep
|
This variable may be used to designate the string which separates the
fields in the records of the data file. If not set, it defaults to the
string
|
forms-read-only
|
If the value is non-
|
forms-multi-line
|
This variable specifies the pseudo newline separator that allows
multi-line fields. This separator goes between the ``lines'' within a
field---thus, the field doesn't really contain multiple lines, but it
appears that way when displayed in Forms mode. If the value is
The default value is
|
forms-read-file-filter
|
This variable holds the name of a function to be called after the data
file has been read in. This can be used to transform the contents of the
data file into a format more suitable for forms processing.
If it is
|
forms-write-file-filter
|
This variable holds the name of a function to be called before writing
out the contents of the data file.
This can be used to undo the effects of
|
forms-new-record-filter
|
This variable holds a function to be called whenever a new record is created
to supply default values for fields. If it is |
forms-modified-record-filter
|
This variable holds a function to be called whenever a record is
modified, just before updating the Forms data file. If it is
|
forms-insert-after
|
If this variable is not |
forms-check-number-of-fields
|
Normally each record is checked to contain the correct number of fields.
Under certain circumstances, this can be undesirable.
If this variable is set to |