(forms.info)Control File Format


Next: Format Description Prev: Data File Format Up: Top

Control File Format
*******************

   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:

          (setq forms-file "my/data-file")

`forms-format-list'
     This variable describes the way the fields of the record are
     formatted on the screen.  For details, see Note: Format
     Description.

`forms-number-of-fields'
     This variable holds the number of fields in each record of the data
     file.  Example:

          (setq forms-number-of-fields 10)

   If the control file doesn't set all of these variables, Forms mode
reports an error.

   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 `"\t"' (a tab character).  Example:

          (setq forms-field-sep "\t")

`forms-read-only'
     If the value is non-`nil', the data file is treated read-only.
     (Forms mode also treats the data file as read-only if you don't
     have access to write it.)  Example:

          (set forms-read-only t)

`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 `nil', multi-line text fields are prohibited.  The pseudo
     newline must not be a character contained in `forms-field-sep'.

     The default value is `"\^k"', so the default pseudo newline is the
     character control-k.  Example:

          (setq forms-multi-line "\^k")

`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 `nil',
     no function is called.  Note: Modifying Forms Contents, for
     details.

`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
     `nil', no function is called.  Note: Modifying Forms Contents,
     for details.


automatically generated by info2www