(forms-mode): Use add-hook rather than make-local-variable+setq.
Use with-current-buffer. Run the new and the old hooks.
(forms--update): Use with-current-buffer and line-end-position.
(forms--goto-record): New fun.
(forms-jump-record, forms-insert-record, forms-delete-record): Use it.
(forms--process-format-list): Remove unused var `this-item'.
(forms--intuit-from-file): Remove unused var `the-result'.
(forms--trans): Remove unused var `x'.
(forms--exit, forms-exit, forms-exit-no-save): Remove unused arg.
force the data buffer to be saved, even if the data didn't
change, in case the write filter was modified. Restore the
current record after read-file-filter finishes.
expicitly since concat will no longer accept integers.
(forms-print): Use local `total-nb-records' since
`forms--total-records' will be inaccessible after buffer switching.
(forms--make-parser-elt, forms-search-forward, forms-search-backward):
Fix error messages.
(forms-save-buffer):
Do not run the `write-file-filter' hooks
explicitly since they are run via `local-write-file-hooks'.
(forms-search-forward, forms-search-backward):
Wrap the search. Use `error' to signal failure.
Remove (beep)s for warnings.
Change comment about the iif hook to reflect the actual reason.
Correct error in field numbering.
(forms-mode): Make `forms--elements' local before calling
`forms--process-format-list'.
(forms-save-buffer): `forms-write-file-filter' and
`forms-read-file-filter' were not called correctly.
forms--make-format): Add `intangible' text property to read-only areas.
(forms-next-field, forms-previous-field): Use
`inhibit-point-motion-hooks' to allow move between two
intangible areas.
forms-search-backward.
(forms--mode-menu-ro, forms--mode-menu-edit): New
functions to create a pulldown menu in the menubar.
(forms--mode-commands): Call them for the edit and view mode.
(forms-print): New function.
preprocess file contents before being passed to forms mode.
(forms-write-file-filter): new hook function to preprocess file
contents before it is being saved to disk. Can be used to undo the
effects of `forms-read-file-filter'.
(forms-mode): Supply a default format if no `forms-format-list' was
specified.
Preprocess file contents using `forms-read-file-filter' and attach
`forms-write-file-filter' to the `local-write-file-hooks' of the file
buffer.
Present a friendly message if the visited file is empty or new.
(forms--intuit-from-file): New subroutine to get the number of fields
from the data file; constructs a default format list.
(forms-save-buffer): Forms mode wrapper for `save-buffer'.
(forms--change-commands, forms--exit): Use it.
(forms--update): Check for the presence of the field separator in any
of the fields. Refuse update if found.
(forms-delete-record): Allow the last record of the file to be
deleted, even if not terminated by a newline.
(forms--local-write-file-function): Remove. Didn't do any good.
Replaced by `forms-save-buffer'.