🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.sources
Article #302

GNU Emacs forms-mode version 1.2.9 (part 3 of 3)

#302
From: Johan Vromans
Date: Tue, 14 Jan 1992 14:37
826 lines
27864 bytes
---- Cut Here and feed the following to sh ----
#!/bin/sh
# this is forms.shr.03 (part 3 of forms)
# do not concatenate these parts, unpack them in order with /bin/sh
# file forms.texinfo continued
#
if test ! -r _shar_seq_.tmp; then
	echo 'Please unpack part 1 first!'
	exit 1
fi
(read Scheck
 if test "$Scheck" != 3; then
	echo Please unpack part "$Scheck" next!
	exit 1
 else
	exit 0
 fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
	echo 'x - still skipping forms.texinfo'
else
echo 'x - continuing file forms.texinfo'
sed 's/^X//' << 'SHAR_EOF' >> 'forms.texinfo' &&
X@item M-x forms-find-file-other-window @var{file}
X@end table
X
XThis command is similar to @code{forms-find-file}, but visits the file
Xin another window.
X
XIf the buffer is not read-only, you may change the buffer to modify the
Xfields in the record. When the current record is left, e.g. by switching
Xto another record, the contents of the buffer are parsed using the
Xspecifications in @code{forms-format-list}, and a new record is constructed
Xwhich replaces the current record in the data file. Fields of the record
Xwhich are not shown in the forms are not modified; they retain their
Xoriginal contents.
X
XMost forms mode commands are bound to keys, and are accessible with the
Xconventional @code{C-c} prefix. In read-only mode this prefix is not used.
X@xref{Key Bindings}, for the default key bindigs used by forms mode.
X
XThe following commands are available within forms mode.
X
X@table @kbd
X@findex forms-next-record
X@item forms-next-record
Xshows the next record. With a prefix argument, show the n-th next
Xrecord.
X
X@findex forms-prev-record
X@item forms-prev-record
Xshows the previous record. With a prefix argument, show the n-th previous
Xrecord.
X
X@findex forms-jump-record
X@item forms-jump-record
Xjumps to a record by number. A prefix argument is used for the record
Xnumber to jump to. If no prefix argument is supplied, a record number is
Xasked for in the minibuffer.@*
XIf an invalid record number is supplied, an error message is displayed
Xreading the offending record number, and the allowable range of numbers.
X
X@findex forms-first-record
X@item forms-first-record
Xjumps to the first record.
X
X@findex forms-last-record
X@item forms-last-record
Xjumps to the last record. Also re-counts the number of records in the data
Xfile.
X
X@findex forms-next-field
X@item forms-next-field
Xjumps to the next field in the forms. With a numeric argument: jumps
Xthat many fields, or to the first field if there are not that many
Xfields left.
X
XJumping to fields is implemented using markers, which are placed
Xin front of the fields. If the contents of the forms are modified, the
Xmarkers are adjusted. However, if text around a marker has been deleted
Xfrom the screen and inserted again it is possible that this marker no
Xlonger points at its field correctly.
X@xref{Markers,,Markers, emacs, the GNU Emacs Lisp Manual}, for more
Xinformation on markers.
X
X@findex forms-view-mode
X@item forms-view-mode
Xswitches to read-only mode. Forms mode commands may no longer be prefixed
Xwith @code{C-c}.
X
X@findex forms-edit-mode
X@item forms-edit-mode
Xswitches to edit mode. Forms mode commands must be prefixed with
X@code{C-c}.@*
XSwitching to edit mode is only possible if write access to the data
Xfile is allowed.
X
X@findex forms-insert-record
X@item forms-insert-record
Xcreate a new record that is inserted before the current record. An empty
Xform is presented, which can be filled in using familiar editor
Xcommands. With a prefix argument (for example, @code{C-u}) the new
Xrecord is created @i{after} the current one.
X
XIf a function @code{forms-new-record-filter} was defined in the control
Xfile, this function is called to fill in default values for fields. The
Xfunction is passed a vector of empty strings, one for each field. For
Xconvenience, an additional element is added so the numbers of the
Xelements are the same as the numbers used in the forms description. The
Xfunction must return the (updated) vector.
X
XInstead of defining the function, @code{forms-new-record-filter} may be
Xset to a function name.
X
XExample:
X@example
X(defun my-new-record-filter (fields)
X  (aset fields 5 (login-name))
X  (aset fields 1 (current-time-string))
X  ;; and return it
X  fields)
X(setq forms-new-record-filter 'my-new-record-filter)
X@end example
X
X@findex forms-delete-record
X@item forms-delete-record
Xdeletes the current record. You are prompted for confirmation before the
Xrecord is deleted unless a prefix argument has been provided.
X
X@findex forms-search
X@item forms-search @var{regexp}
Xsearches for @var{regexp} in all records following this one. If found,
Xthis record is shown.@*
XThe next time it is invoked, the previous regexp is the default, so you
Xcan do repeated searches by simply pressing @key{RET} in response to the
Xprompt.
X
X@findex revert-buffer
X@item revert-buffer
Xreverts a possibly modified forms to its original state. It only affects
Xthe record currently in the forms.
X
X@findex forms-exit
X@item forms-exit
Xterminates forms processing. The data file is saved
Xif it has been modified.
X
X@findex forms-exit-no-save
X@item forms-exit-no-save
Xaborts forms processing. If the data file has been modified Emacs will
Xask questions.
X
X@findex describe-mode
X@item describe-mode
Xgives additional help.
X
X@findex save-buffer
X@item save-buffer
Xsaves the changes in the data file, if modified.
X
X@end table
X
X@vindex forms-forms-scroll
X@findex scroll-up
X@findex scroll-down
XIf the variable @code{forms-forms-scrolls} is set to a value other
Xthan @code{nil} (which it is, by default), the Emacs functions
X@code{scroll-up} and @code{scroll-down} will perform a
X@code{forms-next-record} and @code{forms-prev-record} when in forms
Xmode.  So you can use your favourite page commands to page through the
Xdata file.
X
X@vindex forms-forms-jump
X@findex beginning-of-buffer
X@findex end-of-buffer
XLikewise, if the variable @code{forms-forms-jump} is not @code{nil}
X(which it is, by default), Emacs functions @code{beginning-of-buffer}
Xand @code{end-of-buffer} will perform @code{forms-first-record} and
X@code{forms-last-record} when in forms mode.
X
X@vindex forms-mode-hooks
XAfter forms mode is entered, functions contained in
X@code{forms-mode-hooks} are executed to perform user defined customization.
X
X@node Key Bindings, Miscellaneous, Forms Mode Commands, Top
X@section Key bindings
X
XThis section describes the key bindings as they are defined when
Xinvoking forms mode.@*
XAll commands must be prefixed with @kbd{C-c} when editing a forms. If a
Xforms is read-only, @kbd{C-c} is not used.  The only exception to
Xthis rule is @code{forms-next-field}, which is bound to @kbd{TAB} in all
Xmaps.
X
X@table @kbd
X
X@itemx C-c @key{TAB}
X@code{forms-next-field}
X
X@itemx C-c @key{SPC}
X@code{forms-next-record}
X
X@itemx C-c <
X@code{forms-first-record}
X
X@itemx C-c >
X@code{forms-first-record}
X
X@itemx C-c d
X@code{forms-delete-record}
X
X@itemx C-c e
X@code{forms-edit-mode}
X
X@itemx C-c i
X@code{forms-insert-record}
X
X@itemx C-c j
X@code{forms-jump-record}
X
X@itemx C-c n
X@code{forms-next-record}
X
X@itemx C-c p
X@code{forms-prev-record}
X
X@itemx C-c q
X@code{forms-exit}
X
X@itemx C-c s @var{regexp} 
X@code{forms-search}
X
X@itemx C-c v
X@code{forms-view-mode}
X
X@itemx C-c x
X@code{forms-exit-no-save}
X
X@itemx C-c ?
X@code{describe-mode}
X
X@itemx C-c @key{DEL}
X@code{forms-prev-record}
X
X@end table
X
X@node Miscellaneous, Error Messages, Key Bindings, Top
X@section Miscellaneous
X
X@vindex forms-version
XA global variable @code{forms-version} holds the version information of
Xthe current implementation of forms mode.
X
X@findex forms-enumerate
XIt is very convenient to use symbolic names for the fields in a record.
XThe function @code{forms-enumerate} provides an elegant means to set
Xa series of variables to consecutive numbers.
XThe function returns the higest number used, so it can be used to set
X@code{forms-number-of-fields} also:
X@example
X(setq forms-number-of-fields
X      (forms-enumerate
X       '(field1 field2 field3 ... )))
X@end example
X
X@code{field1} will be set to 1, @code{field2} to 2 and so on.
X
XCare has been taken to localize the current information of the forms
Xmode, so it is possible to visit multiple files in forms mode
Xsimultaneously, even if they have different properties.
X
XSince buffer-local functions are not available in this version of GNU
XEmacs, the definitions of the filter functions
X@code{forms-new-record-filter} and @code{forms-modified-record-filter}
Xare copied into internal, buffer local variables when forms-mode is
Xinitialized.
X
XIf a control file is visited using the standard @code{find-file}
Xcommands, forms mode can be enabled with the command @code{M-x forms-mode}.@*
XForms mode will be automatically enabled if the file contains
Xthe string @code{"-*- forms -*-"} somewhere in the first line. However,
Xthis makes it hard to edit the control file itself so you'd better think
Xtwice before using this.
X
XThe default format for the data file, using @key{TAB} to separate fields
Xand @code{C-k} to separate multi-line fields, matches the file format of
Xsome popular Macintosh database programs, e.g. FileMaker. So
X@code{forms-mode} could decrease the need to use Apple computers.
X
X@node Error Messages, Examples, Miscellaneous, Top
X@section Error Messages
X
XThis section describes all error messages which can be generated by
Xforms mode.
X
X@table @code
X@item 'forms-file' has not been set
XThe variable @code{forms-file} was not set by the control file.
X
X@item 'forms-number-of-fields' has not been set
XThe variable @code{forms-number-of-fields} was not set by the control
Xfile.
X
X@item 'forms-number-of-fields' must be > 0
XThe variable @code{forms-number-of-fields} did not contain a positive
Xnumber. 
X
X@item 'forms-field-sep' is not a string
X@itemx 'forms-multi-line' must be nil or a one-character string
XThe variable @code{forms-multi-line} was set to something other than
X@code{nil or} a single-character string.
X
X@item 'forms-multi-line' is equal to 'forms-field-sep'
XThe variable @code{forms-multi-line} may not be equal to
X@code{forms-field-sep} for this would make it impossible to distinguish
Xfields and the lines in the fields.
X
X@item 'forms-format-list' has not been set
X@itemx 'forms-format-list' is not a list
XThe variable @code{forms-format-list} was not set to a lisp @code{list}
Xby the control file.
X
X@item Forms error: field number @var{XX} out of range 1..@var{NN}
XA field number was supplied with a value of @var{XX}, which was not
Xgreater than zero and smaller than or equal to the number of fields in the
Xforms, @var{NN}.
X
X@item Forms error: not a function @var{FUN}
XThe first element of the lisp list specified in @code{forms-format-list}
Xdid not have a function value.
X
X@item Invalid element in 'forms-format-list': @var{XX}
XA list element was supplied in @code{forms-format-list} which was not a
X@code{string}, @code{number} nor a @code{lisp list}.
X
X@item Parse error: not looking at "..."
XWhen re-parsing the contents of a forms, the text shown could not
Xbe found.
X
X@item Parse error: cannot find "..."
XWhen re-parsing the contents of a forms, the text shown, which
Xseparates two fields, could not be found.
X
X@item Parse error: cannot parse adjacent fields @var{XX} and @var{YY}
XFields @var{XX} and @var{YY} were not separated by text, so could not be
Xparsed again.
X
X@item Record has @var{XX} fields instead of @var{YY}
XThe number of fields in this record in the data file did not match
X@code{forms-number-of-fields}. Missing fields will be set to empty.
X
X@item Multi-line fields in this record - update refused!
XThe current record contains newline characters, hence can not be written
Xback to the data file, for it would corrupt it.@*
Xprobably a field was set to a multi-line value, while the setting of
X@code{forms-multi-line} prohibited this.
X
X@item Record number @var{XX} out of range 1..@var{YY}
XA jump was made to non-existing record @var{XX}. @var{YY} denotes the
Xnumber of records in the file.
X
X@item Stuck at record @var{XX}
XAn internal error prevented a specific record from being retrieved.
X
X@end table
X
X@node Examples, Credits, Error Messages, Top
X@section Examples
X
XThe following example exploits most of the features of forms-mode.
XThis example is included in the distribution as file @file{forms-demo}.
X
X@example
X;; This sample forms exploit most of the features of forms mode.
X
X;; Set the name of the data file.
X(setq forms-file "forms-data")
X
X;; Use 'forms-enumerate' to set field names and number thereof.
X(setq forms-number-of-fields
X      (forms-enumerate
X       '(arch-newsgroup			; 1
X	 arch-volume			; 2
X	 arch-issue			; and ...
X	 arch-article			; ... so
X	 arch-shortname			; ... ... on
X	 arch-parts
X	 arch-from
X	 arch-longname
X	 arch-keywords
X	 arch-date
X	 arch-remarks)))
X
X;; The following functions are used by this form for layout purposes.
X;;
X(defun arch-tocol (target &optional fill)
X  "Produces a string to skip to column TARGET. Prepends newline if needed.
XThe optional FILL should be a character, used to fill to the column."
X  (if (null fill)
X      (setq fill ? ))
X  (if (< target (current-column))
X      (concat "\n" (make-string target fill))
X    (make-string (- target (current-column)) fill)))
X;;
X(defun arch-rj (target field &optional fill) 
X  "Produces a string to skip to column TARGET minus the width of field FIELD.
XPrepends newline if needed. The optional FILL should be a character,
Xused to fill to the column."
X  (arch-tocol (- target (length (nth field forms-fields))) fill))
X
X;; Record filters.
X;; This example uses the (defun ...) method of defining.
X;;
X(defun forms-new-record-filter (the-record)
X  "Form a new record with some defaults."
X  (aset the-record arch-from (user-full-name))
X  (aset the-record arch-date (current-time-string))
X  the-record				; return it
X)
X
X;; The format list.
X(setq forms-format-list
X     (list
X       "====== Public Domain Software Archive ======\n\n"
X       arch-shortname
X       " - "			arch-longname
X       "\n\n"
X       "Article: "		arch-newsgroup
X       "/"			arch-article
X       " "
X       '(arch-tocol 40)
X       "Issue: "		arch-issue
X       " "
X       '(arch-rj 73 10)
X       "Date: "			arch-date
X       "\n\n"
X       "Submitted by: "		arch-from
X       "\n"
X       '(arch-tocol 79 ?-)
X       "\n"
X       "Keywords: "		arch-keywords
X       "\n\n"
X       "Parts: "		arch-parts
X       "\n\n====== Remarks ======\n\n"
X       arch-remarks
X     ))
X
X;; That's all, folks!
X@end example
X
X@node Credits, Concept Index, Examples, Top
X@section Credits
X
XForms mode is developed by Johan Vromans @code{<jv@@mh.nl>} at Multihouse
XReseach in the Netherlands. 
X
XHarald Hanche-Olsen @code{<hanche@@imf.unit.no>} supplied the idea for
Xthe new record filter, and provided better replacements for some
Xinternal functions. 
X
XBugfixes and other useful suggestions were supplied by
Xcwitty@@portia.stanford.edu, Jonathan I. Kamens, Ignatios Souvatzis and
XHarald Hanche-Olsen.
X
XThis documentation was slightly inspired by the documentation of ``rolo
Xmode'' by Paul Davis at Schlumberger Cambridge Research
X@code{<davis%scrsu1%sdr.slb.com@@relay.cs.net>}.
X
XNone of this would have been possible without GNU Emacs of the Free
XSoftware Foundation. Thanks, Richard!
X
X@node Concept Index, Variable Index, Credits, Top
X@unnumbered Concept Index
X@printindex cp
X
X@node Variable Index, Function Index, Concept Index, Top
X@unnumbered Variable Index
X@printindex vr
X
X@node Function Index, , Variable Index, Top
X@unnumbered Function Index
X@printindex fn
X
X@contents
X@bye
X
X@c Local Variables:
X@c eval: (headers)
X@c eval: (setq comment-start "@c  ")
X@c eval: (setq comment-start-skip "@c +")
X@c End:
SHAR_EOF
echo 'File forms.texinfo is complete' &&
chmod 0444 forms.texinfo ||
echo 'restore of forms.texinfo failed'
Wc_c="`wc -c < 'forms.texinfo'`"
test 28578 -eq "$Wc_c" ||
	echo 'forms.texinfo: original size 28578, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= forms-passwd ==============
if test -f 'forms-passwd' -a X"$1" != X"-c"; then
	echo 'x - skipping forms-passwd (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting forms-passwd (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'forms-passwd' &&
X;; forms-passwd -- demo for forms-mode	-*-emacs-lisp-*-
X;; SCCS Status     : @(#)@ forms-passwd	1.1.2
X;; Author          : Johan Vromans
X;; Created On      : 1989
X;; Last Modified By: Johan Vromans
X;; Last Modified On: Tue Jul  2 15:12:45 1991
X;; Update Count    : 2
X;; Status          : OK
X;; 
X;;
X;; This demo visits your passwd file.
X
X;; use yp if present
X(or (file-exists-p (setq forms-file "/var/yp/src/passwd"))
X    (setq forms-file "/etc/passwd"))
X
X(setq forms-read-only t)		; to make sure
X(setq forms-field-sep ":")
X(setq forms-number-of-fields 7)
X
X(setq forms-format-list
X      (list
X       "====== Visiting " forms-file " ======\n\n"
X       "User : "	1
X       "   Uid: "	3
X       "   Gid: "	4
X       "\n\n"
X       "Name : "	5
X       "\n\n"
X       "Home : "	6
X       "\n\n"
X       "Shell: "	7
X       "\n"))
SHAR_EOF
chmod 0444 forms-passwd ||
echo 'restore of forms-passwd failed'
Wc_c="`wc -c < 'forms-passwd'`"
test 815 -eq "$Wc_c" ||
	echo 'forms-passwd: original size 815, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= forms-demo ==============
if test -f 'forms-demo' -a X"$1" != X"-c"; then
	echo 'x - skipping forms-demo (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting forms-demo (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'forms-demo' &&
X;; forms-demo -- demo forms-mode	-*- emacs-lisp -*-
X
X;; SCCS Status     : @(#)@ forms-demo	1.1.4
X;; Author          : Johan Vromans
X;; Created On      : 1989
X;; Last Modified By: Johan Vromans
X;; Last Modified On: Tue Jan 14 15:02:04 1992
X;; Update Count    : 4
X;; Status          : OK
X;; 
X;; This sample forms exploit most of the features of forms mode.
X
X;; Set the name of the data file.
X(setq forms-file "forms-data")
X
X;; Use 'forms-enumerate' to set field names and number thereof.
X(setq forms-number-of-fields
X      (forms-enumerate
X       '(arch-newsgroup			; 1
X	 arch-volume			; 2
X	 arch-issue			; and ...
X	 arch-article			; ... so
X	 arch-shortname			; ... ... on
X	 arch-parts
X	 arch-from
X	 arch-longname
X	 arch-keywords
X	 arch-date
X	 arch-remarks)))
X
X;; The following functions are used by this form for layout purposes.
X;;
X(defun arch-tocol (target &optional fill)
X  "Produces a string to skip to column TARGET. Prepends newline if needed.
XThe optional FILL should be a character, used to fill to the column."
X  (if (null fill)
X      (setq fill ? ))
X  (if (< target (current-column))
X      (concat "\n" (make-string target fill))
X    (make-string (- target (current-column)) fill)))
X;;
X(defun arch-rj (target field &optional fill) 
X  "Produces a string to skip to column TARGET minus the width of field FIELD.
XPrepends newline if needed. The optional FILL should be a character,
Xused to fill to the column."
X  (arch-tocol (- target (length (nth field forms-fields))) fill))
X
X;; Record filters.
X;; This example uses the (defun ...) method of defining.
X;;
X(defun forms-new-record-filter (the-record)
X  "Form a new record with some defaults."
X  (aset the-record arch-from (user-full-name))
X  (aset the-record arch-date (current-time-string))
X  the-record				; return it
X)
X
X;; The format list.
X(setq forms-format-list
X     (list
X       "====== Public Domain Software Archive ======\n\n"
X       arch-shortname
X       " - "			arch-longname
X       "\n\n"
X       "Article: "		arch-newsgroup
X       "/"			arch-article
X       " "
X       '(arch-tocol 40)
X       "Issue: "		arch-issue
X       " "
X       '(arch-rj 73 10)
X       "Date: "			arch-date
X       "\n\n"
X       "Submitted by: "		arch-from
X       "\n"
X       '(arch-tocol 79 ?-)
X       "\n"
X       "Keywords: "		arch-keywords
X       "\n\n"
X       "Parts: "		arch-parts
X       "\n\n====== Remarks ======\n\n"
X       arch-remarks
X     ))
X
X;; That's all, folks!
SHAR_EOF
chmod 0444 forms-demo ||
echo 'restore of forms-demo failed'
Wc_c="`wc -c < 'forms-demo'`"
test 2413 -eq "$Wc_c" ||
	echo 'forms-demo: original size 2413, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= README ==============
if test -f 'README' -a X"$1" != X"-c"; then
	echo 'x - skipping README (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting README (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'README' &&
XThis is GNU Emacs 'forms-mode', version 1.2 (patchlevel 9).
X
XThis GNU Emacs major mode implements editing a structured file (i.e. a
Xfile with 'records' and 'fields' in it) using a forms. 
XIt is fully documented in the source file 'forms.el' and in the
Xtexinfo file 'forms.texinfo'.
X
XThis kit contains:
X
X	README		- this file
X	MANIFEST	- list of files
X	forms.el	- the lisp source
X	forms.texinfo	- texinfo file
X	forms-passwd	- simple demo using /etc/passwd
X	forms-demo	- advanced demo using 'forms-data'
X	forms-data	- data for forms-demo
X
XLoad the lisp source, and execute
X
X	forms-find-file forms-passwd
X
Xto look at your password file in a unconventional (but read-only) way.
X
X	forms-find-file forms-demo
X
Xgives you something to clobber with data and multi-line fields.
X
XThis program has been donated to the Free Software Foundation to be
Xpart of their GNU Emacs programming system.
X
XHave fun!
X
X	Johan Vromans	<jv@mh.nl>
X
XHISTORY
X-------
X
X1.2.9  Released: Jan 14, 1992
X
X  * Add LCD entry for the lisp archive.
X
X  * Add (provide 'forms) but retain (provide 'forms-mode) for
X    compatibility. 
X
X  * Changed the names of the files so they all start with 'forms'.
X    To ease integration with the GNU Emacs sources.
X
X1.2.7  Released: Jul 1, 1991
X
X New features:
X  * Is it now possible to define a function
X    `forms-modified-record-filter' in the control file, that gets
X    called when a new record is created.  It can be used to change
X    values in fields.
X
X  * The filter functions may also point to a function.
X
X  * Support for functions and lisp symbols in forms-format-list.
X
X  * Function forms-enumerate can be helpful when defining 'symbolic
X    names' for fields.
X
X  * 'demo2' has been enhanced to exploit most of the new features.
X
X Misc.:
X  * Internally optimized the forms-format-list.
X
X  * Added support for debugging.
X
X  * Stripped duplicate documentation.
X
X1.2.3  Released: May 21, 1991
X
X Fixed bug:
X  * Make argument to scroll-{up,down} &optional.
X
X1.2.2  Released: May 20, 1991
X
X Fixed bug:
X  * The modifications to the last field of a form were not handled
X    correctly if that field was not followed by fixed text.
X
X1.2.1  Released: Sep 18, 1990
X
X New feature:
X  * Is it now possible to define a function `forms-new-record-filter' in
X    the control file, that gets called when a new record is created.
X    It can be used to insert default values in fields.
X    Thanks to Harald Hanche-Olsen <hanche@imf.unit.no> .
X
X Fixed bugs:
X  * `save-buffer' was redefined as (interactive "P"). This should have
X    been (interactive "p").
X    Thanks to Jonathan Kamens <jik@pit-manager.MIT.EDU> .
X  * `forms--checkmod' was not called often enough to prevent modified
X    records from getting lost in spurious situations.
X    Thanks to u502sou@mpirbn.uucp (Ignatios Souvatzis).
X  * When updating a new record, sometimes it got prepended to the next
X    record. 
X    Thanks to several users.
X
X Other modifications:
X  * Harald Hanche-Olsen <hanche@imf.unit.no> rewrote
X    forms--make-format and forms--make-parser to use the more standard
X    backquote construct.
X
X And finally:
X  * Ignatios Souvatzis wrote a forms routine to sort a file on
X    selected fields. I did not include it because I don't think that
X    sorting belongs to the functionality of forms-mode. Ignatios
X    wrote me:
X
X      as i didn't want to look up the man page for /bin/sort, i wrote
X      a sort function for you forms mode. You may include it in your
X      next distribution to the net or FSF, if you want (as long as
X      there remains a trace of who wrote that ~30 lines). Else tell me
X      please so that i can post the sort code myself.
SHAR_EOF
chmod 0444 README ||
echo 'restore of README failed'
Wc_c="`wc -c < 'README'`"
test 3625 -eq "$Wc_c" ||
	echo 'README: original size 3625, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= forms-data ==============
if test -f 'forms-data' -a X"$1" != X"-c"; then
	echo 'x - skipping forms-data (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting forms-data (Binary)'
sed 's/^X//' << 'SHAR_EOF' > _shar_tmp_.tmp &&
Xbegin 600 forms-data
XM8V]M<"YS;W5R8V5S+G5N:7@)"78Q,6DP,#@),C8Y"6=E='1Y+65N86)L90DQ
XM"71R;VY`<V,N;G-C+F-O;2`H4F]N86QD(%,N($MA<G(I"4=E='1Y(&]N+V]F
XM9B!P<F]G<F%M<R!F;W(@-"Y;,C-=($)31`D).#DP-3`U"51H:7,@<')O9W)A
XM;2!C86X@8F4@=7-E9"!T;R!D>6YA;6EC86QL>2!E;F%B;&4@+R!D:7-A8FQE
XM('1E<FUI;F%L"VQI;F5S(&]N(&$@0E-$('-Y<W1E;2X+"F-O;7`N<V]U<F-E
XM<RYU;FEX"3$Q"78Q,6DP,C(),C@S"7-Y<VQO9PDQ"65M;W)Y(6%R;F]L9"`H
XM07)N;VQD($0N(%)O8F)I;G,@>T550T-]*0E$979E;&]P;65N="!V97)S:6]N
XM(&]F('-Y<VQO9R@S*2P@9F]R($%45"P@=&]O"0DR."\P."\Q.3@W"0IC;VUP
XM+G-O=7)C97,N=6YI>`DQ,0EV,3%I,#,S"3(Y,`EL97-S,PDS"7-U;B%I;G1S
XM8R%C;VYV9W0A;6%R:PE4:&4@)VQE<W,G('!A9V5R"0DP,B\P.2\Q.3@W"0IC
XM;VUP+G-O=7)C97,N=6YI>`DQ,0EV,3%I,#,V"3(Y,PET97-T+F5L"3,)(DUA
XM<FL@02X@07)D:7,B(#QM86%`<V5I+F-M=2YE9'4^"51E<W0@<WES=&5M(&9O
X9<B!'3E4@16UA8W,)"3$P+S`Y+S$Y.#<)"BYE
X`
Xend
SHAR_EOF
echo 'uudecoding file forms-data' &&
uudecode < _shar_tmp_.tmp && rm -f _shar_tmp_.tmp &&
chmod 0644 forms-data ||
echo 'restore of forms-data failed'
Wc_c="`wc -c < 'forms-data'`"
test 565 -eq "$Wc_c" ||
	echo 'forms-data: original size 565, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
rm -f _shar_seq_.tmp
echo You have unpacked the last part
exit 0
-- 
Johan Vromans				       jv@mh.nl via internet backbones
Multihouse Automatisering bv		       uucp:..!{uunet,sun4nl}!mh.nl!jv
Doesburgweg 7, 2803 PL Gouda, The Netherlands  phone/fax: +31 1820 62911/62500
------------------------ "Arms are made for hugging" -------------------------
Technical Details
Message-ID: <1992Jan14.143715.7745@pronto.mh.nl>
Path: arc1-ca.pugleaf.net!wupost!zaphod.mps.ohio-state.edu!think.com!yale.edu!jvnc.net!darwin.sura.net!europa.asd.contel.com!uunet!mcsun!sun4nl!mhres!pronto!jv

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!wupost!zaphod.mps.ohio-state.edu!think.com!yale.edu!jvnc.net!darwin.sura.net!europa.asd.contel.com!uunet!mcsun!sun4nl!mhres!pronto!jv
From: jv@mh.nl (Johan Vromans)
Newsgroups: gnu.emacs.sources,alt.sources
Subject: GNU Emacs forms-mode version 1.2.9 (part 3 of 3)
Message-ID: <1992Jan14.143715.7745@pronto.mh.nl>
Date: 14 Jan 92 14:37:15 GMT
Sender: jv@pronto.mh.nl (Johan Vromans)
Distribution: gnu
Organization: Multihouse Automation, the Netherlands
Lines: 826
X-Md4-Signature: 56dfb0287cdd7b0b6249c6f54ca7c394