annotate man/forms.texi @ 45086:837bbff5c257

Whitespace change.
author Richard M. Stallman <rms@gnu.org>
date Fri, 03 May 2002 19:33:38 +0000
parents 730f77edf073
children 82d113655734
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
1 \input texinfo @c -*-texinfo-*-
Dave Love <fx@gnu.org>
parents:
diff changeset
2 @c documentation for forms-mode
Dave Love <fx@gnu.org>
parents:
diff changeset
3 @c Written by Johan Vromans, and edited by Richard Stallman
Dave Love <fx@gnu.org>
parents:
diff changeset
4
Dave Love <fx@gnu.org>
parents:
diff changeset
5 @comment %**start of header (This is for running Texinfo on a region.)
Dave Love <fx@gnu.org>
parents:
diff changeset
6 @setfilename ../info/forms
Dave Love <fx@gnu.org>
parents:
diff changeset
7 @settitle Forms Mode User's Manual
Dave Love <fx@gnu.org>
parents:
diff changeset
8 @syncodeindex vr cp
Dave Love <fx@gnu.org>
parents:
diff changeset
9 @syncodeindex fn cp
Dave Love <fx@gnu.org>
parents:
diff changeset
10 @syncodeindex ky cp
Dave Love <fx@gnu.org>
parents:
diff changeset
11 @iftex
Dave Love <fx@gnu.org>
parents:
diff changeset
12 @finalout
Dave Love <fx@gnu.org>
parents:
diff changeset
13 @setchapternewpage odd
Dave Love <fx@gnu.org>
parents:
diff changeset
14 @end iftex
Dave Love <fx@gnu.org>
parents:
diff changeset
15 @c @smallbook
Dave Love <fx@gnu.org>
parents:
diff changeset
16 @comment %**end of header (This is for running Texinfo on a region.)
Dave Love <fx@gnu.org>
parents:
diff changeset
17
30009
95bdbefcdac6 Use dircategory `Emacs'.
Gerd Moellmann <gerd@gnu.org>
parents: 25829
diff changeset
18 @dircategory Emacs
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
19 @direntry
Dave Love <fx@gnu.org>
parents:
diff changeset
20 * Forms: (forms). Emacs package for editing data bases
Dave Love <fx@gnu.org>
parents:
diff changeset
21 by filling in forms.
Dave Love <fx@gnu.org>
parents:
diff changeset
22 @end direntry
Dave Love <fx@gnu.org>
parents:
diff changeset
23
Dave Love <fx@gnu.org>
parents:
diff changeset
24 @ifinfo
Dave Love <fx@gnu.org>
parents:
diff changeset
25 This file documents Forms mode, a form-editing major mode for GNU Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
26
37404
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
27 Copyright 1989, 1997, 2001 Free Software Foundation, Inc.
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
28
37404
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
29 Permission is granted to copy, distribute and/or modify this document
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
30 under the terms of the GNU Free Documentation License, Version 1.1 or
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
31 any later version published by the Free Software Foundation; with no
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
32 Invariant Sections, with the Front-Cover texts being ``A GNU
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
33 Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
34 license is included in the section entitled ``GNU Free Documentation
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
35 License'' in the Emacs manual.
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
36
37404
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
37 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
38 this GNU Manual, like GNU software. Copies published by the Free
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
39 Software Foundation raise funds for GNU development.''
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
40
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
41 This document is part of a collection distributed under the GNU Free
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
42 Documentation License. If you want to distribute this document
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
43 separately from the collection, you can do so by adding a copy of the
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
44 license to the document, as described in section 6 of the license.
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
45 @end ifinfo
Dave Love <fx@gnu.org>
parents:
diff changeset
46
Dave Love <fx@gnu.org>
parents:
diff changeset
47 @iftex
Dave Love <fx@gnu.org>
parents:
diff changeset
48 @titlepage
Dave Love <fx@gnu.org>
parents:
diff changeset
49 @sp 6
Dave Love <fx@gnu.org>
parents:
diff changeset
50 @center @titlefont{Forms Mode User's Manual}
Dave Love <fx@gnu.org>
parents:
diff changeset
51 @sp 4
Dave Love <fx@gnu.org>
parents:
diff changeset
52 @center Forms-Mode version 2
Dave Love <fx@gnu.org>
parents:
diff changeset
53 @sp 1
Dave Love <fx@gnu.org>
parents:
diff changeset
54 @center for GNU Emacs 20.1
Dave Love <fx@gnu.org>
parents:
diff changeset
55 @sp 1
Dave Love <fx@gnu.org>
parents:
diff changeset
56 @center June 1997
Dave Love <fx@gnu.org>
parents:
diff changeset
57 @sp 5
Dave Love <fx@gnu.org>
parents:
diff changeset
58 @center Johan Vromans
Dave Love <fx@gnu.org>
parents:
diff changeset
59 @center @i{jvromans@@squirrel.nl}
Dave Love <fx@gnu.org>
parents:
diff changeset
60 @page
Dave Love <fx@gnu.org>
parents:
diff changeset
61
Dave Love <fx@gnu.org>
parents:
diff changeset
62 @vskip 0pt plus 1filll
37404
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
63 Copyright @copyright{} 1989, 1997, 2001 Free Software Foundation, Inc.
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
64
37404
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
65 Permission is granted to copy, distribute and/or modify this document
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
66 under the terms of the GNU Free Documentation License, Version 1.1 or
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
67 any later version published by the Free Software Foundation; with no
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
68 Invariant Sections, with the Front-Cover texts being ``A GNU
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
69 Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
70 license is included in the section entitled ``GNU Free Documentation
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
71 License'' in the Emacs manual.
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
72
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
73 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
74 this GNU Manual, like GNU software. Copies published by the Free
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
75 Software Foundation raise funds for GNU development.''
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
76
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
77 This document is part of a collection distributed under the GNU Free
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
78 Documentation License. If you want to distribute this document
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
79 separately from the collection, you can do so by adding a copy of the
730f77edf073 Use GNU Free Documentation License.
Gerd Moellmann <gerd@gnu.org>
parents: 30009
diff changeset
80 license to the document, as described in section 6 of the license.
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
81 @page
Dave Love <fx@gnu.org>
parents:
diff changeset
82 @end titlepage
Dave Love <fx@gnu.org>
parents:
diff changeset
83 @end iftex
Dave Love <fx@gnu.org>
parents:
diff changeset
84
Dave Love <fx@gnu.org>
parents:
diff changeset
85 @ifinfo
Dave Love <fx@gnu.org>
parents:
diff changeset
86 @node Top
Dave Love <fx@gnu.org>
parents:
diff changeset
87 @top Forms Mode
Dave Love <fx@gnu.org>
parents:
diff changeset
88
Dave Love <fx@gnu.org>
parents:
diff changeset
89 Forms mode is an Emacs major mode for working with simple textual data
Dave Love <fx@gnu.org>
parents:
diff changeset
90 bases in a forms-oriented manner. In Forms mode, the information in
Dave Love <fx@gnu.org>
parents:
diff changeset
91 these files is presented in an Emacs window in a user-defined format,
Dave Love <fx@gnu.org>
parents:
diff changeset
92 one record at a time. The user can view records or modify their
Dave Love <fx@gnu.org>
parents:
diff changeset
93 contents.
Dave Love <fx@gnu.org>
parents:
diff changeset
94
Dave Love <fx@gnu.org>
parents:
diff changeset
95 Forms mode is not a simple major mode, but requires two files to do its
Dave Love <fx@gnu.org>
parents:
diff changeset
96 job: a control file and a data file. The data file holds the
Dave Love <fx@gnu.org>
parents:
diff changeset
97 actual data to be presented. The control file describes
Dave Love <fx@gnu.org>
parents:
diff changeset
98 how to present it.
Dave Love <fx@gnu.org>
parents:
diff changeset
99
Dave Love <fx@gnu.org>
parents:
diff changeset
100 @menu
Dave Love <fx@gnu.org>
parents:
diff changeset
101 * Forms Example:: An example: editing the password data base.
Dave Love <fx@gnu.org>
parents:
diff changeset
102 * Entering and Exiting Forms Mode::
Dave Love <fx@gnu.org>
parents:
diff changeset
103 How to visit a file in Forms mode.
Dave Love <fx@gnu.org>
parents:
diff changeset
104 * Forms Commands:: Special commands to use while in Forms mode.
Dave Love <fx@gnu.org>
parents:
diff changeset
105 * Data File Format:: How to format the data file.
Dave Love <fx@gnu.org>
parents:
diff changeset
106 * Control File Format:: How to control forms mode.
Dave Love <fx@gnu.org>
parents:
diff changeset
107 * Format Description:: How to define the forms layout.
Dave Love <fx@gnu.org>
parents:
diff changeset
108 * Modifying Forms Contents:: How to modify.
Dave Love <fx@gnu.org>
parents:
diff changeset
109 * Miscellaneous:: Forms mode messages and other remarks.
Dave Love <fx@gnu.org>
parents:
diff changeset
110 * Error Messages:: List of error messages forms mode can produce.
Dave Love <fx@gnu.org>
parents:
diff changeset
111 * Long Example:: A more complex control file example.
Dave Love <fx@gnu.org>
parents:
diff changeset
112 * Credits:: Thanks everyone.
Dave Love <fx@gnu.org>
parents:
diff changeset
113 * Index:: Index to this manual.
Dave Love <fx@gnu.org>
parents:
diff changeset
114 @end menu
Dave Love <fx@gnu.org>
parents:
diff changeset
115 @end ifinfo
Dave Love <fx@gnu.org>
parents:
diff changeset
116
Dave Love <fx@gnu.org>
parents:
diff changeset
117 @node Forms Example
Dave Love <fx@gnu.org>
parents:
diff changeset
118 @chapter Forms Example
Dave Love <fx@gnu.org>
parents:
diff changeset
119
Dave Love <fx@gnu.org>
parents:
diff changeset
120 Let's illustrate Forms mode with an example. Suppose you are looking at
Dave Love <fx@gnu.org>
parents:
diff changeset
121 the @file{/etc/passwd} file, and the screen looks like this:
Dave Love <fx@gnu.org>
parents:
diff changeset
122
Dave Love <fx@gnu.org>
parents:
diff changeset
123 @example
Dave Love <fx@gnu.org>
parents:
diff changeset
124 ====== /etc/passwd ======
Dave Love <fx@gnu.org>
parents:
diff changeset
125
Dave Love <fx@gnu.org>
parents:
diff changeset
126 User : root Uid: 0 Gid: 1
Dave Love <fx@gnu.org>
parents:
diff changeset
127
Dave Love <fx@gnu.org>
parents:
diff changeset
128 Name : Super User
Dave Love <fx@gnu.org>
parents:
diff changeset
129
Dave Love <fx@gnu.org>
parents:
diff changeset
130 Home : /
Dave Love <fx@gnu.org>
parents:
diff changeset
131
Dave Love <fx@gnu.org>
parents:
diff changeset
132 Shell: /bin/sh
Dave Love <fx@gnu.org>
parents:
diff changeset
133 @end example
Dave Love <fx@gnu.org>
parents:
diff changeset
134
Dave Love <fx@gnu.org>
parents:
diff changeset
135 As you can see, the familiar fields from the entry for the super user
Dave Love <fx@gnu.org>
parents:
diff changeset
136 are all there, but instead of being colon-separated on one single line,
Dave Love <fx@gnu.org>
parents:
diff changeset
137 they make up a forms.
Dave Love <fx@gnu.org>
parents:
diff changeset
138
Dave Love <fx@gnu.org>
parents:
diff changeset
139 The contents of the forms consist of the contents of the fields of the
Dave Love <fx@gnu.org>
parents:
diff changeset
140 record (e.g. @samp{root}, @samp{0}, @samp{1}, @samp{Super User})
Dave Love <fx@gnu.org>
parents:
diff changeset
141 interspersed with normal text (e.g @samp{User : }, @samp{Uid: }).
Dave Love <fx@gnu.org>
parents:
diff changeset
142
Dave Love <fx@gnu.org>
parents:
diff changeset
143 If you modify the contents of the fields, Forms mode will analyze your
Dave Love <fx@gnu.org>
parents:
diff changeset
144 changes and update the file appropriately. You cannot modify the
Dave Love <fx@gnu.org>
parents:
diff changeset
145 interspersed explanatory text (unless you go to some trouble about it),
Dave Love <fx@gnu.org>
parents:
diff changeset
146 because that is marked read-only (@pxref{Text Properties,,, elisp, The
Dave Love <fx@gnu.org>
parents:
diff changeset
147 Emacs Lisp Reference Manual}).
Dave Love <fx@gnu.org>
parents:
diff changeset
148
Dave Love <fx@gnu.org>
parents:
diff changeset
149 The Forms mode control file specifies the relationship between the
Dave Love <fx@gnu.org>
parents:
diff changeset
150 format of @file{/etc/passwd} and what appears on the screen in Forms
Dave Love <fx@gnu.org>
parents:
diff changeset
151 mode. @xref{Control File Format}.
Dave Love <fx@gnu.org>
parents:
diff changeset
152
Dave Love <fx@gnu.org>
parents:
diff changeset
153 @node Entering and Exiting Forms Mode
Dave Love <fx@gnu.org>
parents:
diff changeset
154 @chapter Entering and Exiting Forms Mode
Dave Love <fx@gnu.org>
parents:
diff changeset
155
Dave Love <fx@gnu.org>
parents:
diff changeset
156 @table @kbd
Dave Love <fx@gnu.org>
parents:
diff changeset
157 @findex forms-find-file
Dave Love <fx@gnu.org>
parents:
diff changeset
158 @item M-x forms-find-file @key{RET} @var{control-file} @key{RET}
Dave Love <fx@gnu.org>
parents:
diff changeset
159 Visit a database using Forms mode. Specify the name of the
Dave Love <fx@gnu.org>
parents:
diff changeset
160 @strong{control file}, not the data file!
Dave Love <fx@gnu.org>
parents:
diff changeset
161
Dave Love <fx@gnu.org>
parents:
diff changeset
162 @findex forms-find-file-other-window
Dave Love <fx@gnu.org>
parents:
diff changeset
163 @item M-x forms-find-file-other-window @key{RET} @var{control-file} @key{RET}
Dave Love <fx@gnu.org>
parents:
diff changeset
164 Similar, but displays the file in another window.
Dave Love <fx@gnu.org>
parents:
diff changeset
165 @end table
Dave Love <fx@gnu.org>
parents:
diff changeset
166
Dave Love <fx@gnu.org>
parents:
diff changeset
167 The command @code{forms-find-file} evaluates the file
Dave Love <fx@gnu.org>
parents:
diff changeset
168 @var{control-file}, and also visits it in Forms mode. What you see in
Dave Love <fx@gnu.org>
parents:
diff changeset
169 its buffer is not the contents of this file, but rather a single record
Dave Love <fx@gnu.org>
parents:
diff changeset
170 of the corresponding data file that is visited in its own buffer. So
Dave Love <fx@gnu.org>
parents:
diff changeset
171 there are two buffers involved in Forms mode: the @dfn{forms buffer}
Dave Love <fx@gnu.org>
parents:
diff changeset
172 that is initially used to visit the control file and that shows the
Dave Love <fx@gnu.org>
parents:
diff changeset
173 records being browsed, and the @dfn{data buffer} that holds the data
Dave Love <fx@gnu.org>
parents:
diff changeset
174 file being visited. The latter buffer is normally not visible.
Dave Love <fx@gnu.org>
parents:
diff changeset
175
Dave Love <fx@gnu.org>
parents:
diff changeset
176 Initially, the first record is displayed in the forms buffer.
Dave Love <fx@gnu.org>
parents:
diff changeset
177 The mode line displays the major mode name @samp{Forms}, followed by the
Dave Love <fx@gnu.org>
parents:
diff changeset
178 minor mode @samp{View} if the data base is read-only. The number of the
Dave Love <fx@gnu.org>
parents:
diff changeset
179 current record (@var{n}) and the total number of records in the
Dave Love <fx@gnu.org>
parents:
diff changeset
180 file(@var{t}) are shown in the mode line as @samp{@var{n}/@var{t}}. For
Dave Love <fx@gnu.org>
parents:
diff changeset
181 example:
Dave Love <fx@gnu.org>
parents:
diff changeset
182
Dave Love <fx@gnu.org>
parents:
diff changeset
183 @example
Dave Love <fx@gnu.org>
parents:
diff changeset
184 --%%-Emacs: passwd-demo (Forms View 1/54)----All-------
Dave Love <fx@gnu.org>
parents:
diff changeset
185 @end example
Dave Love <fx@gnu.org>
parents:
diff changeset
186
Dave Love <fx@gnu.org>
parents:
diff changeset
187 If the buffer is not read-only, you may change the buffer to modify the
Dave Love <fx@gnu.org>
parents:
diff changeset
188 fields in the record. When you move to a different record, the contents
Dave Love <fx@gnu.org>
parents:
diff changeset
189 of the buffer are parsed using the specifications in
Dave Love <fx@gnu.org>
parents:
diff changeset
190 @code{forms-format-list}, and the data file is updated. If the record
Dave Love <fx@gnu.org>
parents:
diff changeset
191 has fields that aren't included in the display, they are not changed.
Dave Love <fx@gnu.org>
parents:
diff changeset
192
Dave Love <fx@gnu.org>
parents:
diff changeset
193 @vindex forms-mode-hooks
Dave Love <fx@gnu.org>
parents:
diff changeset
194 Entering Forms mode runs the normal hook @code{forms-mode-hooks} to
Dave Love <fx@gnu.org>
parents:
diff changeset
195 perform user-defined customization.
Dave Love <fx@gnu.org>
parents:
diff changeset
196
Dave Love <fx@gnu.org>
parents:
diff changeset
197 To save any modified data, you can use @kbd{C-x C-s}
Dave Love <fx@gnu.org>
parents:
diff changeset
198 (@code{forms-save-buffer}). This does not save the forms buffer (which would
Dave Love <fx@gnu.org>
parents:
diff changeset
199 be rather useless), but instead saves the buffer visiting the data file.
Dave Love <fx@gnu.org>
parents:
diff changeset
200
Dave Love <fx@gnu.org>
parents:
diff changeset
201 To terminate Forms mode, you can use @kbd{C-x C-s} (@code{forms-save-buffer})
Dave Love <fx@gnu.org>
parents:
diff changeset
202 and then kill the forms buffer. However, the data buffer will still
Dave Love <fx@gnu.org>
parents:
diff changeset
203 remain. If this is not desired, you have to kill this buffer too.
Dave Love <fx@gnu.org>
parents:
diff changeset
204
Dave Love <fx@gnu.org>
parents:
diff changeset
205 @node Forms Commands
Dave Love <fx@gnu.org>
parents:
diff changeset
206 @chapter Forms Commands
Dave Love <fx@gnu.org>
parents:
diff changeset
207
Dave Love <fx@gnu.org>
parents:
diff changeset
208 The commands of Forms mode belong to the @kbd{C-c} prefix, with one
Dave Love <fx@gnu.org>
parents:
diff changeset
209 exception: @key{TAB}, which moves to the next field. Forms mode uses
Dave Love <fx@gnu.org>
parents:
diff changeset
210 different key maps for normal mode and read-only mode. In read-only
Dave Love <fx@gnu.org>
parents:
diff changeset
211 Forms mode, you can access most of the commands without the @kbd{C-c}
Dave Love <fx@gnu.org>
parents:
diff changeset
212 prefix, but you must type ordinary letters instead of control
Dave Love <fx@gnu.org>
parents:
diff changeset
213 characters; for example, type @kbd{n} instead of @kbd{C-c C-n}.
Dave Love <fx@gnu.org>
parents:
diff changeset
214
Dave Love <fx@gnu.org>
parents:
diff changeset
215 If your Emacs has been built with X-toolkit support, Forms mode will
Dave Love <fx@gnu.org>
parents:
diff changeset
216 provide its own menu with a number of Forms mode commands.
Dave Love <fx@gnu.org>
parents:
diff changeset
217
Dave Love <fx@gnu.org>
parents:
diff changeset
218 @table @kbd
Dave Love <fx@gnu.org>
parents:
diff changeset
219 @findex forms-next-record
Dave Love <fx@gnu.org>
parents:
diff changeset
220 @kindex C-c C-n
Dave Love <fx@gnu.org>
parents:
diff changeset
221 @item C-c C-n
Dave Love <fx@gnu.org>
parents:
diff changeset
222 Show the next record (@code{forms-next-record}). With a numeric
Dave Love <fx@gnu.org>
parents:
diff changeset
223 argument @var{n}, show the @var{n}th next record.
Dave Love <fx@gnu.org>
parents:
diff changeset
224
Dave Love <fx@gnu.org>
parents:
diff changeset
225 @findex forms-prev-record
Dave Love <fx@gnu.org>
parents:
diff changeset
226 @kindex C-c C-p
Dave Love <fx@gnu.org>
parents:
diff changeset
227 @item C-c C-p
Dave Love <fx@gnu.org>
parents:
diff changeset
228 Show the previous record (@code{forms-prev-record}). With a numeric
Dave Love <fx@gnu.org>
parents:
diff changeset
229 argument @var{n}, show the @var{n}th previous record.
Dave Love <fx@gnu.org>
parents:
diff changeset
230
Dave Love <fx@gnu.org>
parents:
diff changeset
231 @findex forms-jump-record
Dave Love <fx@gnu.org>
parents:
diff changeset
232 @kindex C-c C-l
Dave Love <fx@gnu.org>
parents:
diff changeset
233 @item C-c C-l
Dave Love <fx@gnu.org>
parents:
diff changeset
234 Jump to a record by number (@code{forms-jump-record}). Specify
Dave Love <fx@gnu.org>
parents:
diff changeset
235 the record number with a numeric argument.
Dave Love <fx@gnu.org>
parents:
diff changeset
236
Dave Love <fx@gnu.org>
parents:
diff changeset
237 @findex forms-first-record
Dave Love <fx@gnu.org>
parents:
diff changeset
238 @kindex C-c <
Dave Love <fx@gnu.org>
parents:
diff changeset
239 @item C-c <
Dave Love <fx@gnu.org>
parents:
diff changeset
240 Jump to the first record (@code{forms-first-record}).
Dave Love <fx@gnu.org>
parents:
diff changeset
241
Dave Love <fx@gnu.org>
parents:
diff changeset
242 @findex forms-last-record
Dave Love <fx@gnu.org>
parents:
diff changeset
243 @kindex C-c >
Dave Love <fx@gnu.org>
parents:
diff changeset
244 @item C-c >
Dave Love <fx@gnu.org>
parents:
diff changeset
245 Jump to the last record (@code{forms-last-record}). This command also
Dave Love <fx@gnu.org>
parents:
diff changeset
246 recalculates the number of records in the data file.
Dave Love <fx@gnu.org>
parents:
diff changeset
247
Dave Love <fx@gnu.org>
parents:
diff changeset
248 @findex forms-next-field
Dave Love <fx@gnu.org>
parents:
diff changeset
249 @kindex TAB
Dave Love <fx@gnu.org>
parents:
diff changeset
250 @item @key{TAB}
Dave Love <fx@gnu.org>
parents:
diff changeset
251 @kindex C-c TAB
Dave Love <fx@gnu.org>
parents:
diff changeset
252 @itemx C-c @key{TAB}
Dave Love <fx@gnu.org>
parents:
diff changeset
253 Jump to the next field in the current record (@code{forms-next-field}).
Dave Love <fx@gnu.org>
parents:
diff changeset
254 With a numeric argument @var{n}, jump forward @var{n} fields. If this command
Dave Love <fx@gnu.org>
parents:
diff changeset
255 would move past the last field, it wraps around to the first field.
Dave Love <fx@gnu.org>
parents:
diff changeset
256
Dave Love <fx@gnu.org>
parents:
diff changeset
257 @findex forms-toggle-read-only
Dave Love <fx@gnu.org>
parents:
diff changeset
258 @kindex C-c C-q
Dave Love <fx@gnu.org>
parents:
diff changeset
259 @item C-c C-q
Dave Love <fx@gnu.org>
parents:
diff changeset
260 Toggles read-only mode (@code{forms-toggle-read-only}). In read-only
Dave Love <fx@gnu.org>
parents:
diff changeset
261 Forms mode, you cannot edit the fields; most Forms mode commands can be
Dave Love <fx@gnu.org>
parents:
diff changeset
262 accessed without the prefix @kbd{C-c} if you use the normal letter
Dave Love <fx@gnu.org>
parents:
diff changeset
263 instead (for example, type @kbd{n} instead of @kbd{C-c C-n}). In edit
Dave Love <fx@gnu.org>
parents:
diff changeset
264 mode, you can edit the fields and thus change the contents of the data
Dave Love <fx@gnu.org>
parents:
diff changeset
265 base; you must begin Forms mode commands with @code{C-c}. Switching
Dave Love <fx@gnu.org>
parents:
diff changeset
266 to edit mode is allowed only if you have write access to the data file.
Dave Love <fx@gnu.org>
parents:
diff changeset
267
Dave Love <fx@gnu.org>
parents:
diff changeset
268 @findex forms-insert-record
Dave Love <fx@gnu.org>
parents:
diff changeset
269 @kindex C-c C-o
Dave Love <fx@gnu.org>
parents:
diff changeset
270 @item C-c C-o
Dave Love <fx@gnu.org>
parents:
diff changeset
271 Create a new record and insert it before the current record
Dave Love <fx@gnu.org>
parents:
diff changeset
272 (@code{forms-insert-record}). It starts out with empty (or default)
Dave Love <fx@gnu.org>
parents:
diff changeset
273 contents for its fields; you can then edit the fields. With a numeric
Dave Love <fx@gnu.org>
parents:
diff changeset
274 argument, the new record is created @emph{after} the current one.
Dave Love <fx@gnu.org>
parents:
diff changeset
275 See also @code{forms-modified-record-filter} in @ref{Modifying Forms
Dave Love <fx@gnu.org>
parents:
diff changeset
276 Contents}.
Dave Love <fx@gnu.org>
parents:
diff changeset
277
Dave Love <fx@gnu.org>
parents:
diff changeset
278 @findex forms-delete-record
Dave Love <fx@gnu.org>
parents:
diff changeset
279 @kindex C-c C-k
Dave Love <fx@gnu.org>
parents:
diff changeset
280 @item C-c C-k
Dave Love <fx@gnu.org>
parents:
diff changeset
281 Delete the current record (@code{forms-delete-record}). You are
Dave Love <fx@gnu.org>
parents:
diff changeset
282 prompted for confirmation before the record is deleted unless a numeric
Dave Love <fx@gnu.org>
parents:
diff changeset
283 argument has been provided.
Dave Love <fx@gnu.org>
parents:
diff changeset
284
Dave Love <fx@gnu.org>
parents:
diff changeset
285 @findex forms-search-forward
Dave Love <fx@gnu.org>
parents:
diff changeset
286 @kindex C-c C-s @var{regexp} @key{RET}
Dave Love <fx@gnu.org>
parents:
diff changeset
287 @item C-c C-s @var{regexp} @key{RET}
Dave Love <fx@gnu.org>
parents:
diff changeset
288 Search forward for @var{regexp} in all records following this one
Dave Love <fx@gnu.org>
parents:
diff changeset
289 (@code{forms-search-forward}). If found, this record is shown.
Dave Love <fx@gnu.org>
parents:
diff changeset
290 If you give an empty argument, the previous regexp is used again.
Dave Love <fx@gnu.org>
parents:
diff changeset
291
Dave Love <fx@gnu.org>
parents:
diff changeset
292 @findex forms-search-backward
Dave Love <fx@gnu.org>
parents:
diff changeset
293 @kindex C-c C-r @var{regexp} @key{RET}
Dave Love <fx@gnu.org>
parents:
diff changeset
294 @item C-c C-r @var{regexp} @key{RET}
Dave Love <fx@gnu.org>
parents:
diff changeset
295 Search backward for @var{regexp} in all records following this one
Dave Love <fx@gnu.org>
parents:
diff changeset
296 (@code{forms-search-backward}). If found, this record is shown.
Dave Love <fx@gnu.org>
parents:
diff changeset
297 If you give an empty argument, the previous regexp is used again.
Dave Love <fx@gnu.org>
parents:
diff changeset
298
Dave Love <fx@gnu.org>
parents:
diff changeset
299 @ignore
Dave Love <fx@gnu.org>
parents:
diff changeset
300 @findex forms-exit
Dave Love <fx@gnu.org>
parents:
diff changeset
301 @kindex C-c C-x
Dave Love <fx@gnu.org>
parents:
diff changeset
302 @item C-c C-x
Dave Love <fx@gnu.org>
parents:
diff changeset
303 Terminate Forms mode processing (@code{forms-exit}). The data file is
Dave Love <fx@gnu.org>
parents:
diff changeset
304 saved if it has been modified.
Dave Love <fx@gnu.org>
parents:
diff changeset
305
Dave Love <fx@gnu.org>
parents:
diff changeset
306 @findex forms-exit-no-save
Dave Love <fx@gnu.org>
parents:
diff changeset
307 @item M-x forms-exit-no-save
Dave Love <fx@gnu.org>
parents:
diff changeset
308 Terminates forms mode processing without saving modified data first.
Dave Love <fx@gnu.org>
parents:
diff changeset
309 @end ignore
Dave Love <fx@gnu.org>
parents:
diff changeset
310
Dave Love <fx@gnu.org>
parents:
diff changeset
311 @findex forms-prev-field
Dave Love <fx@gnu.org>
parents:
diff changeset
312 @item M-x forms-prev-field
Dave Love <fx@gnu.org>
parents:
diff changeset
313 Similar to @code{forms-next-field} but moves backwards.
Dave Love <fx@gnu.org>
parents:
diff changeset
314
Dave Love <fx@gnu.org>
parents:
diff changeset
315 @findex forms-save-buffer
Dave Love <fx@gnu.org>
parents:
diff changeset
316 @item M-x forms-save-buffer
Dave Love <fx@gnu.org>
parents:
diff changeset
317 @kindex C-x C-s
Dave Love <fx@gnu.org>
parents:
diff changeset
318 @itemx C-x C-s
Dave Love <fx@gnu.org>
parents:
diff changeset
319 Forms mode replacement for @code{save-buffer}. When executed in the
Dave Love <fx@gnu.org>
parents:
diff changeset
320 forms buffer it will save the contents of the (modified) data buffer
Dave Love <fx@gnu.org>
parents:
diff changeset
321 instead. In Forms mode this function will be bound to @kbd{C-x C-s}.
Dave Love <fx@gnu.org>
parents:
diff changeset
322
Dave Love <fx@gnu.org>
parents:
diff changeset
323 @findex forms-print
Dave Love <fx@gnu.org>
parents:
diff changeset
324 @item M-x forms-print
Dave Love <fx@gnu.org>
parents:
diff changeset
325 This command can be used to make a formatted print
Dave Love <fx@gnu.org>
parents:
diff changeset
326 of the contents of the data file.
Dave Love <fx@gnu.org>
parents:
diff changeset
327
Dave Love <fx@gnu.org>
parents:
diff changeset
328 @end table
Dave Love <fx@gnu.org>
parents:
diff changeset
329
Dave Love <fx@gnu.org>
parents:
diff changeset
330 In addition the command @kbd{M-x revert-buffer} is useful in Forms mode
Dave Love <fx@gnu.org>
parents:
diff changeset
331 just as in other modes.
Dave Love <fx@gnu.org>
parents:
diff changeset
332
Dave Love <fx@gnu.org>
parents:
diff changeset
333 @ignore
Dave Love <fx@gnu.org>
parents:
diff changeset
334 @vindex forms-forms-scroll
Dave Love <fx@gnu.org>
parents:
diff changeset
335 @findex scroll-up
Dave Love <fx@gnu.org>
parents:
diff changeset
336 @findex scroll-down
Dave Love <fx@gnu.org>
parents:
diff changeset
337 If the variable @code{forms-forms-scrolls} is set to a value other
Dave Love <fx@gnu.org>
parents:
diff changeset
338 than @code{nil} (which it is, by default), the Emacs functions
Dave Love <fx@gnu.org>
parents:
diff changeset
339 @code{scroll-up} and @code{scroll-down} will perform a
Dave Love <fx@gnu.org>
parents:
diff changeset
340 @code{forms-next-record} and @code{forms-prev-record} when in forms
Dave Love <fx@gnu.org>
parents:
diff changeset
341 mode. So you can use your favourite page commands to page through the
Dave Love <fx@gnu.org>
parents:
diff changeset
342 data file.
Dave Love <fx@gnu.org>
parents:
diff changeset
343
Dave Love <fx@gnu.org>
parents:
diff changeset
344 @vindex forms-forms-jump
Dave Love <fx@gnu.org>
parents:
diff changeset
345 @findex beginning-of-buffer
Dave Love <fx@gnu.org>
parents:
diff changeset
346 @findex end-of-buffer
Dave Love <fx@gnu.org>
parents:
diff changeset
347 Likewise, if the variable @code{forms-forms-jump} is not @code{nil}
Dave Love <fx@gnu.org>
parents:
diff changeset
348 (which it is, by default), Emacs functions @code{beginning-of-buffer}
Dave Love <fx@gnu.org>
parents:
diff changeset
349 and @code{end-of-buffer} will perform @code{forms-first-record} and
Dave Love <fx@gnu.org>
parents:
diff changeset
350 @code{forms-last-record} when in forms mode.
Dave Love <fx@gnu.org>
parents:
diff changeset
351 @end ignore
Dave Love <fx@gnu.org>
parents:
diff changeset
352
Dave Love <fx@gnu.org>
parents:
diff changeset
353 The following function key definitions are set up in Forms mode
Dave Love <fx@gnu.org>
parents:
diff changeset
354 (whether read-only or not):
Dave Love <fx@gnu.org>
parents:
diff changeset
355
Dave Love <fx@gnu.org>
parents:
diff changeset
356 @table @kbd
Dave Love <fx@gnu.org>
parents:
diff changeset
357 @kindex next
Dave Love <fx@gnu.org>
parents:
diff changeset
358 @item next
Dave Love <fx@gnu.org>
parents:
diff changeset
359 forms-next-record
Dave Love <fx@gnu.org>
parents:
diff changeset
360
Dave Love <fx@gnu.org>
parents:
diff changeset
361 @kindex prior
Dave Love <fx@gnu.org>
parents:
diff changeset
362 @item prior
Dave Love <fx@gnu.org>
parents:
diff changeset
363 forms-prev-record
Dave Love <fx@gnu.org>
parents:
diff changeset
364
Dave Love <fx@gnu.org>
parents:
diff changeset
365 @kindex begin
Dave Love <fx@gnu.org>
parents:
diff changeset
366 @item begin
Dave Love <fx@gnu.org>
parents:
diff changeset
367 forms-first-record
Dave Love <fx@gnu.org>
parents:
diff changeset
368
Dave Love <fx@gnu.org>
parents:
diff changeset
369 @kindex end
Dave Love <fx@gnu.org>
parents:
diff changeset
370 @item end
Dave Love <fx@gnu.org>
parents:
diff changeset
371 forms-last-record
Dave Love <fx@gnu.org>
parents:
diff changeset
372
Dave Love <fx@gnu.org>
parents:
diff changeset
373 @kindex S-Tab
Dave Love <fx@gnu.org>
parents:
diff changeset
374 @findex forms-prev-field
Dave Love <fx@gnu.org>
parents:
diff changeset
375 @item S-Tab
Dave Love <fx@gnu.org>
parents:
diff changeset
376 forms-prev-field
Dave Love <fx@gnu.org>
parents:
diff changeset
377 @end table
Dave Love <fx@gnu.org>
parents:
diff changeset
378
Dave Love <fx@gnu.org>
parents:
diff changeset
379 @node Data File Format
Dave Love <fx@gnu.org>
parents:
diff changeset
380 @chapter Data File Format
Dave Love <fx@gnu.org>
parents:
diff changeset
381
Dave Love <fx@gnu.org>
parents:
diff changeset
382 @cindex record
Dave Love <fx@gnu.org>
parents:
diff changeset
383 @cindex field
Dave Love <fx@gnu.org>
parents:
diff changeset
384 @vindex forms-field-sep
Dave Love <fx@gnu.org>
parents:
diff changeset
385 Files for use with Forms mode are very simple---each @dfn{record}
Dave Love <fx@gnu.org>
parents:
diff changeset
386 (usually one line) forms the contents of one form. Each record consists
Dave Love <fx@gnu.org>
parents:
diff changeset
387 of a number of @dfn{fields}, which are separated by the value of the
Dave Love <fx@gnu.org>
parents:
diff changeset
388 string @code{forms-field-sep}, which is @code{"\t"} (a Tab) by default.
Dave Love <fx@gnu.org>
parents:
diff changeset
389
Dave Love <fx@gnu.org>
parents:
diff changeset
390 @vindex forms-read-file-filter
Dave Love <fx@gnu.org>
parents:
diff changeset
391 @vindex forms-write-file-filter
Dave Love <fx@gnu.org>
parents:
diff changeset
392 If the format of the data file is not suitable enough you can define the
Dave Love <fx@gnu.org>
parents:
diff changeset
393 filter functions @code{forms-read-file-filter} and
Dave Love <fx@gnu.org>
parents:
diff changeset
394 @code{forms-write-file-filter}. @code{forms-read-file-filter} is called
Dave Love <fx@gnu.org>
parents:
diff changeset
395 when the data file is read from disk into the data buffer. It operates
Dave Love <fx@gnu.org>
parents:
diff changeset
396 on the data buffer, ignoring read-only protections. When the data file
Dave Love <fx@gnu.org>
parents:
diff changeset
397 is saved to disk @code{forms-write-file-filter} is called to cancel the
Dave Love <fx@gnu.org>
parents:
diff changeset
398 effects of @code{forms-read-file-filter}. After being saved,
Dave Love <fx@gnu.org>
parents:
diff changeset
399 @code{forms-read-file-filter} is called again to prepare the data buffer
Dave Love <fx@gnu.org>
parents:
diff changeset
400 for further processing.
Dave Love <fx@gnu.org>
parents:
diff changeset
401
Dave Love <fx@gnu.org>
parents:
diff changeset
402 @cindex pseudo-newline
Dave Love <fx@gnu.org>
parents:
diff changeset
403 @vindex forms-multi-line
Dave Love <fx@gnu.org>
parents:
diff changeset
404 Fields may contain text which shows up in the forms in multiple lines.
Dave Love <fx@gnu.org>
parents:
diff changeset
405 These lines are separated in the field using a ``pseudo-newline''
Dave Love <fx@gnu.org>
parents:
diff changeset
406 character which is defined by the value of the string
Dave Love <fx@gnu.org>
parents:
diff changeset
407 @code{forms-multi-line}. Its default value is @code{"\^k"} (a Control-K
Dave Love <fx@gnu.org>
parents:
diff changeset
408 character). If it is
Dave Love <fx@gnu.org>
parents:
diff changeset
409 set to @code{nil}, multiple line fields are prohibited.
Dave Love <fx@gnu.org>
parents:
diff changeset
410
Dave Love <fx@gnu.org>
parents:
diff changeset
411 If the data file does not exist, it is automatically created.
Dave Love <fx@gnu.org>
parents:
diff changeset
412
Dave Love <fx@gnu.org>
parents:
diff changeset
413 @node Control File Format
Dave Love <fx@gnu.org>
parents:
diff changeset
414 @chapter Control File Format
Dave Love <fx@gnu.org>
parents:
diff changeset
415
Dave Love <fx@gnu.org>
parents:
diff changeset
416 @cindex control file
Dave Love <fx@gnu.org>
parents:
diff changeset
417 The Forms mode @dfn{control file} serves two purposes. First, it names
Dave Love <fx@gnu.org>
parents:
diff changeset
418 the data file to use, and defines its format and properties. Second,
Dave Love <fx@gnu.org>
parents:
diff changeset
419 the Emacs buffer it occupies is used by Forms mode to display the forms.
Dave Love <fx@gnu.org>
parents:
diff changeset
420
Dave Love <fx@gnu.org>
parents:
diff changeset
421 The contents of the control file are evaluated as a Lisp program. It
Dave Love <fx@gnu.org>
parents:
diff changeset
422 should set the following Lisp variables to suitable values:
Dave Love <fx@gnu.org>
parents:
diff changeset
423
Dave Love <fx@gnu.org>
parents:
diff changeset
424 @table @code
Dave Love <fx@gnu.org>
parents:
diff changeset
425 @vindex forms-file
Dave Love <fx@gnu.org>
parents:
diff changeset
426 @item forms-file
Dave Love <fx@gnu.org>
parents:
diff changeset
427 This variable specifies the name of the data file. Example:
Dave Love <fx@gnu.org>
parents:
diff changeset
428
Dave Love <fx@gnu.org>
parents:
diff changeset
429 @example
Dave Love <fx@gnu.org>
parents:
diff changeset
430 (setq forms-file "my/data-file")
Dave Love <fx@gnu.org>
parents:
diff changeset
431 @end example
Dave Love <fx@gnu.org>
parents:
diff changeset
432
Dave Love <fx@gnu.org>
parents:
diff changeset
433 If the control file doesn't set @code{forms-file}, Forms mode
Dave Love <fx@gnu.org>
parents:
diff changeset
434 reports an error.
Dave Love <fx@gnu.org>
parents:
diff changeset
435
Dave Love <fx@gnu.org>
parents:
diff changeset
436 @vindex forms-format-list
Dave Love <fx@gnu.org>
parents:
diff changeset
437 @item forms-format-list
Dave Love <fx@gnu.org>
parents:
diff changeset
438 This variable describes the way the fields of the record are formatted on
Dave Love <fx@gnu.org>
parents:
diff changeset
439 the screen. For details, see @ref{Format Description}.
Dave Love <fx@gnu.org>
parents:
diff changeset
440
Dave Love <fx@gnu.org>
parents:
diff changeset
441 @vindex forms-number-of-fields
Dave Love <fx@gnu.org>
parents:
diff changeset
442 @item forms-number-of-fields
Dave Love <fx@gnu.org>
parents:
diff changeset
443 This variable holds the number of fields in each record of the data
Dave Love <fx@gnu.org>
parents:
diff changeset
444 file. Example:
Dave Love <fx@gnu.org>
parents:
diff changeset
445
Dave Love <fx@gnu.org>
parents:
diff changeset
446 @example
Dave Love <fx@gnu.org>
parents:
diff changeset
447 (setq forms-number-of-fields 10)
Dave Love <fx@gnu.org>
parents:
diff changeset
448 @end example
Dave Love <fx@gnu.org>
parents:
diff changeset
449 @end table
Dave Love <fx@gnu.org>
parents:
diff changeset
450
Dave Love <fx@gnu.org>
parents:
diff changeset
451 If the control file does not set @code{forms-format-list} a default
Dave Love <fx@gnu.org>
parents:
diff changeset
452 format is used. In this situation, Forms mode will deduce the number of
Dave Love <fx@gnu.org>
parents:
diff changeset
453 fields from the data file providing this file exists and
Dave Love <fx@gnu.org>
parents:
diff changeset
454 @code{forms-number-of-records} has not been set in the control file.
Dave Love <fx@gnu.org>
parents:
diff changeset
455
Dave Love <fx@gnu.org>
parents:
diff changeset
456 The control file can optionally set the following additional Forms mode
Dave Love <fx@gnu.org>
parents:
diff changeset
457 variables. Most of them have default values that are good for most
Dave Love <fx@gnu.org>
parents:
diff changeset
458 applications.
Dave Love <fx@gnu.org>
parents:
diff changeset
459
Dave Love <fx@gnu.org>
parents:
diff changeset
460 @table @code
Dave Love <fx@gnu.org>
parents:
diff changeset
461 @vindex forms-field-sep
Dave Love <fx@gnu.org>
parents:
diff changeset
462 @item forms-field-sep
Dave Love <fx@gnu.org>
parents:
diff changeset
463 This variable may be used to designate the string which separates the
Dave Love <fx@gnu.org>
parents:
diff changeset
464 fields in the records of the data file. If not set, it defaults to the
Dave Love <fx@gnu.org>
parents:
diff changeset
465 string @code{"\t"} (a Tab character). Example:
Dave Love <fx@gnu.org>
parents:
diff changeset
466
Dave Love <fx@gnu.org>
parents:
diff changeset
467 @example
Dave Love <fx@gnu.org>
parents:
diff changeset
468 (setq forms-field-sep "\t")
Dave Love <fx@gnu.org>
parents:
diff changeset
469 @end example
Dave Love <fx@gnu.org>
parents:
diff changeset
470
Dave Love <fx@gnu.org>
parents:
diff changeset
471 @vindex forms-read-only
Dave Love <fx@gnu.org>
parents:
diff changeset
472 @item forms-read-only
Dave Love <fx@gnu.org>
parents:
diff changeset
473 If the value is non-@code{nil}, the data file is treated read-only. (Forms
Dave Love <fx@gnu.org>
parents:
diff changeset
474 mode also treats the data file as read-only if you don't have access to
Dave Love <fx@gnu.org>
parents:
diff changeset
475 write it.) Example:
Dave Love <fx@gnu.org>
parents:
diff changeset
476
Dave Love <fx@gnu.org>
parents:
diff changeset
477 @example
Dave Love <fx@gnu.org>
parents:
diff changeset
478 (set forms-read-only t)
Dave Love <fx@gnu.org>
parents:
diff changeset
479 @end example
Dave Love <fx@gnu.org>
parents:
diff changeset
480
Dave Love <fx@gnu.org>
parents:
diff changeset
481 @vindex forms-multi-line
Dave Love <fx@gnu.org>
parents:
diff changeset
482 @item forms-multi-line
Dave Love <fx@gnu.org>
parents:
diff changeset
483 This variable specifies the @dfn{pseudo newline} separator that allows
Dave Love <fx@gnu.org>
parents:
diff changeset
484 multi-line fields. This separator goes between the ``lines'' within a
Dave Love <fx@gnu.org>
parents:
diff changeset
485 field---thus, the field doesn't really contain multiple lines, but it
Dave Love <fx@gnu.org>
parents:
diff changeset
486 appears that way when displayed in Forms mode. If the value is
Dave Love <fx@gnu.org>
parents:
diff changeset
487 @code{nil}, multi-line text fields are prohibited. The pseudo newline
Dave Love <fx@gnu.org>
parents:
diff changeset
488 must not be a character contained in @code{forms-field-sep}.
Dave Love <fx@gnu.org>
parents:
diff changeset
489
Dave Love <fx@gnu.org>
parents:
diff changeset
490 The default value is @code{"\^k"}, the character Control-K. Example:
Dave Love <fx@gnu.org>
parents:
diff changeset
491
Dave Love <fx@gnu.org>
parents:
diff changeset
492 @example
Dave Love <fx@gnu.org>
parents:
diff changeset
493 (setq forms-multi-line "\^k")
Dave Love <fx@gnu.org>
parents:
diff changeset
494 @end example
Dave Love <fx@gnu.org>
parents:
diff changeset
495
Dave Love <fx@gnu.org>
parents:
diff changeset
496 @ignore
Dave Love <fx@gnu.org>
parents:
diff changeset
497 @vindex forms-forms-scroll
Dave Love <fx@gnu.org>
parents:
diff changeset
498 @item forms-forms-scroll
Dave Love <fx@gnu.org>
parents:
diff changeset
499 @xref{Forms Mode Commands}, for details.
Dave Love <fx@gnu.org>
parents:
diff changeset
500
Dave Love <fx@gnu.org>
parents:
diff changeset
501 @vindex forms-forms-jump
Dave Love <fx@gnu.org>
parents:
diff changeset
502 @item forms-forms-jump
Dave Love <fx@gnu.org>
parents:
diff changeset
503 @xref{Forms Mode Commands}, for details.
Dave Love <fx@gnu.org>
parents:
diff changeset
504 @end ignore
Dave Love <fx@gnu.org>
parents:
diff changeset
505
Dave Love <fx@gnu.org>
parents:
diff changeset
506 @findex forms-read-file-filter
Dave Love <fx@gnu.org>
parents:
diff changeset
507 @item forms-read-file-filter
Dave Love <fx@gnu.org>
parents:
diff changeset
508 This variable holds the name of a function to be called after the data
Dave Love <fx@gnu.org>
parents:
diff changeset
509 file has been read in. This can be used to transform the contents of the
Dave Love <fx@gnu.org>
parents:
diff changeset
510 data file into a format more suitable for forms processing.
Dave Love <fx@gnu.org>
parents:
diff changeset
511 If it is @code{nil}, no function is called. For example, to maintain a
Dave Love <fx@gnu.org>
parents:
diff changeset
512 gzipped database:
Dave Love <fx@gnu.org>
parents:
diff changeset
513
Dave Love <fx@gnu.org>
parents:
diff changeset
514 @example
Dave Love <fx@gnu.org>
parents:
diff changeset
515 (defun gzip-read-file-filter ()
Dave Love <fx@gnu.org>
parents:
diff changeset
516 (shell-command-on-region (point-min) (point-max)
Dave Love <fx@gnu.org>
parents:
diff changeset
517 "gzip -d" t t))
Dave Love <fx@gnu.org>
parents:
diff changeset
518 (setq forms-read-file-filter 'gzip-read-file-filter)
Dave Love <fx@gnu.org>
parents:
diff changeset
519 @end example
Dave Love <fx@gnu.org>
parents:
diff changeset
520
Dave Love <fx@gnu.org>
parents:
diff changeset
521 @findex forms-write-file-filter
Dave Love <fx@gnu.org>
parents:
diff changeset
522 @item forms-write-file-filter
Dave Love <fx@gnu.org>
parents:
diff changeset
523 This variable holds the name of a function to be called before writing
Dave Love <fx@gnu.org>
parents:
diff changeset
524 out the contents of the data file.
Dave Love <fx@gnu.org>
parents:
diff changeset
525 This can be used to undo the effects of @code{forms-read-file-filter}.
Dave Love <fx@gnu.org>
parents:
diff changeset
526 If it is @code{nil}, no function is called. Example:
Dave Love <fx@gnu.org>
parents:
diff changeset
527
Dave Love <fx@gnu.org>
parents:
diff changeset
528 @example
Dave Love <fx@gnu.org>
parents:
diff changeset
529 (defun gzip-write-file-filter ()
Dave Love <fx@gnu.org>
parents:
diff changeset
530 (make-variable-buffer-local 'require-final-newline)
Dave Love <fx@gnu.org>
parents:
diff changeset
531 (setq require-final-newline nil)
Dave Love <fx@gnu.org>
parents:
diff changeset
532 (shell-command-on-region (point-min) (point-max)
Dave Love <fx@gnu.org>
parents:
diff changeset
533 "gzip" t t))
Dave Love <fx@gnu.org>
parents:
diff changeset
534 (setq forms-write-file-filter 'gzip-write-file-filter)
Dave Love <fx@gnu.org>
parents:
diff changeset
535 @end example
Dave Love <fx@gnu.org>
parents:
diff changeset
536
Dave Love <fx@gnu.org>
parents:
diff changeset
537 @findex forms-new-record-filter
Dave Love <fx@gnu.org>
parents:
diff changeset
538 @item forms-new-record-filter
Dave Love <fx@gnu.org>
parents:
diff changeset
539 This variable holds a function to be called whenever a new record is created
Dave Love <fx@gnu.org>
parents:
diff changeset
540 to supply default values for fields. If it is @code{nil}, no function is
Dave Love <fx@gnu.org>
parents:
diff changeset
541 called.
Dave Love <fx@gnu.org>
parents:
diff changeset
542 @xref{Modifying Forms Contents}, for details.
Dave Love <fx@gnu.org>
parents:
diff changeset
543
Dave Love <fx@gnu.org>
parents:
diff changeset
544 @findex forms-modified-record-filter
Dave Love <fx@gnu.org>
parents:
diff changeset
545 @item forms-modified-record-filter
Dave Love <fx@gnu.org>
parents:
diff changeset
546 This variable holds a function to be called whenever a record is
Dave Love <fx@gnu.org>
parents:
diff changeset
547 modified, just before updating the Forms data file. If it is
Dave Love <fx@gnu.org>
parents:
diff changeset
548 @code{nil}, no function is called.
Dave Love <fx@gnu.org>
parents:
diff changeset
549 @xref{Modifying Forms Contents}, for details.
Dave Love <fx@gnu.org>
parents:
diff changeset
550
Dave Love <fx@gnu.org>
parents:
diff changeset
551 @findex forms-insert-after
Dave Love <fx@gnu.org>
parents:
diff changeset
552 @item forms-insert-after
Dave Love <fx@gnu.org>
parents:
diff changeset
553 If this variable is not @code{nil}, new records are created @emph{after} the
Dave Love <fx@gnu.org>
parents:
diff changeset
554 current record. Also, upon visiting a file, the initial position will be
Dave Love <fx@gnu.org>
parents:
diff changeset
555 at the last record instead of the first one.
Dave Love <fx@gnu.org>
parents:
diff changeset
556
Dave Love <fx@gnu.org>
parents:
diff changeset
557 @findex forms-check-number-of-fields
Dave Love <fx@gnu.org>
parents:
diff changeset
558 @item forms-check-number-of-fields
Dave Love <fx@gnu.org>
parents:
diff changeset
559 Normally each record is checked to contain the correct number of fields.
Dave Love <fx@gnu.org>
parents:
diff changeset
560 Under certain circumstances, this can be undesirable.
Dave Love <fx@gnu.org>
parents:
diff changeset
561 If this variable is set to @code{nil}, these checks will be bypassed.
Dave Love <fx@gnu.org>
parents:
diff changeset
562 @end table
Dave Love <fx@gnu.org>
parents:
diff changeset
563
Dave Love <fx@gnu.org>
parents:
diff changeset
564 @node Format Description
Dave Love <fx@gnu.org>
parents:
diff changeset
565 @chapter The Format Description
Dave Love <fx@gnu.org>
parents:
diff changeset
566
Dave Love <fx@gnu.org>
parents:
diff changeset
567 @vindex forms-format-list
Dave Love <fx@gnu.org>
parents:
diff changeset
568 The variable @code{forms-format-list} specifies the format of the data
Dave Love <fx@gnu.org>
parents:
diff changeset
569 in the data file, and how to convert the data for display in Forms mode.
Dave Love <fx@gnu.org>
parents:
diff changeset
570 Its value must be a list of Forms mode @dfn{formatting elements}, each
Dave Love <fx@gnu.org>
parents:
diff changeset
571 of which can be a string, a number, a Lisp list, or a Lisp symbol that
Dave Love <fx@gnu.org>
parents:
diff changeset
572 evaluates to one of those. The formatting elements are processed in the
Dave Love <fx@gnu.org>
parents:
diff changeset
573 order they appear in the list.
Dave Love <fx@gnu.org>
parents:
diff changeset
574
Dave Love <fx@gnu.org>
parents:
diff changeset
575 @table @var
Dave Love <fx@gnu.org>
parents:
diff changeset
576 @item string
Dave Love <fx@gnu.org>
parents:
diff changeset
577 A string formatting element is inserted in the forms ``as is,'' as text
Dave Love <fx@gnu.org>
parents:
diff changeset
578 that the user cannot alter.
Dave Love <fx@gnu.org>
parents:
diff changeset
579
Dave Love <fx@gnu.org>
parents:
diff changeset
580 @item number
Dave Love <fx@gnu.org>
parents:
diff changeset
581 A number element selects a field of the record. The contents of this
Dave Love <fx@gnu.org>
parents:
diff changeset
582 field are inserted in the display at this point. Field numbers count
Dave Love <fx@gnu.org>
parents:
diff changeset
583 starting from 1 (one).
Dave Love <fx@gnu.org>
parents:
diff changeset
584
Dave Love <fx@gnu.org>
parents:
diff changeset
585 @item list
Dave Love <fx@gnu.org>
parents:
diff changeset
586 A formatting element that is a list specifies a function call. This
Dave Love <fx@gnu.org>
parents:
diff changeset
587 function is called every time a record is displayed, and its result,
Dave Love <fx@gnu.org>
parents:
diff changeset
588 which must be a string, is inserted in the display text. The function
Dave Love <fx@gnu.org>
parents:
diff changeset
589 should do nothing but returning a string.
Dave Love <fx@gnu.org>
parents:
diff changeset
590
Dave Love <fx@gnu.org>
parents:
diff changeset
591 @vindex forms-fields
Dave Love <fx@gnu.org>
parents:
diff changeset
592 The function you call can access the fields of the record as a list in
Dave Love <fx@gnu.org>
parents:
diff changeset
593 the variable
Dave Love <fx@gnu.org>
parents:
diff changeset
594 @code{forms-fields}.
Dave Love <fx@gnu.org>
parents:
diff changeset
595
Dave Love <fx@gnu.org>
parents:
diff changeset
596 @item symbol
Dave Love <fx@gnu.org>
parents:
diff changeset
597 A symbol used as a formatting element should evaluate to a string, number,
Dave Love <fx@gnu.org>
parents:
diff changeset
598 or list; the value is interpreted as a formatting element, as described
Dave Love <fx@gnu.org>
parents:
diff changeset
599 above.
Dave Love <fx@gnu.org>
parents:
diff changeset
600 @end table
Dave Love <fx@gnu.org>
parents:
diff changeset
601
Dave Love <fx@gnu.org>
parents:
diff changeset
602 If a record does not contain the number of fields as specified in
Dave Love <fx@gnu.org>
parents:
diff changeset
603 @code{forms-number-of-fields}, a warning message will be printed. Excess
Dave Love <fx@gnu.org>
parents:
diff changeset
604 fields are ignored, missing fields are set to empty.
Dave Love <fx@gnu.org>
parents:
diff changeset
605
Dave Love <fx@gnu.org>
parents:
diff changeset
606 The control file which displays @file{/etc/passwd} file as demonstrated
Dave Love <fx@gnu.org>
parents:
diff changeset
607 in the beginning of this manual might look as follows:
Dave Love <fx@gnu.org>
parents:
diff changeset
608
Dave Love <fx@gnu.org>
parents:
diff changeset
609 @example
Dave Love <fx@gnu.org>
parents:
diff changeset
610 ;; @r{This demo visits @file{/etc/passwd}.}
Dave Love <fx@gnu.org>
parents:
diff changeset
611
Dave Love <fx@gnu.org>
parents:
diff changeset
612 (setq forms-file "/etc/passwd")
Dave Love <fx@gnu.org>
parents:
diff changeset
613 (setq forms-number-of-fields 7)
Dave Love <fx@gnu.org>
parents:
diff changeset
614 (setq forms-read-only t) ; @r{to make sure}
Dave Love <fx@gnu.org>
parents:
diff changeset
615 (setq forms-field-sep ":")
Dave Love <fx@gnu.org>
parents:
diff changeset
616 ;; @r{Don't allow multi-line fields.}
Dave Love <fx@gnu.org>
parents:
diff changeset
617 (setq forms-multi-line nil)
Dave Love <fx@gnu.org>
parents:
diff changeset
618
Dave Love <fx@gnu.org>
parents:
diff changeset
619 (setq forms-format-list
Dave Love <fx@gnu.org>
parents:
diff changeset
620 (list
Dave Love <fx@gnu.org>
parents:
diff changeset
621 "====== /etc/passwd ======\n\n"
Dave Love <fx@gnu.org>
parents:
diff changeset
622 "User : " 1
Dave Love <fx@gnu.org>
parents:
diff changeset
623 " Uid: " 3
Dave Love <fx@gnu.org>
parents:
diff changeset
624 " Gid: " 4
Dave Love <fx@gnu.org>
parents:
diff changeset
625 "\n\n"
Dave Love <fx@gnu.org>
parents:
diff changeset
626 "Name : " 5
Dave Love <fx@gnu.org>
parents:
diff changeset
627 "\n\n"
Dave Love <fx@gnu.org>
parents:
diff changeset
628 "Home : " 6
Dave Love <fx@gnu.org>
parents:
diff changeset
629 "\n\n"
Dave Love <fx@gnu.org>
parents:
diff changeset
630 "Shell: " 7
Dave Love <fx@gnu.org>
parents:
diff changeset
631 "\n"))
Dave Love <fx@gnu.org>
parents:
diff changeset
632 @end example
Dave Love <fx@gnu.org>
parents:
diff changeset
633
Dave Love <fx@gnu.org>
parents:
diff changeset
634 When you construct the value of @code{forms-format-list}, you should
Dave Love <fx@gnu.org>
parents:
diff changeset
635 usually either quote the whole value, like this,
Dave Love <fx@gnu.org>
parents:
diff changeset
636
Dave Love <fx@gnu.org>
parents:
diff changeset
637 @example
Dave Love <fx@gnu.org>
parents:
diff changeset
638 (setq forms-format-list
Dave Love <fx@gnu.org>
parents:
diff changeset
639 '(
Dave Love <fx@gnu.org>
parents:
diff changeset
640 "====== " forms-file " ======\n\n"
Dave Love <fx@gnu.org>
parents:
diff changeset
641 "User : " 1
Dave Love <fx@gnu.org>
parents:
diff changeset
642 (make-string 20 ?-)
Dave Love <fx@gnu.org>
parents:
diff changeset
643 @dots{}
Dave Love <fx@gnu.org>
parents:
diff changeset
644 ))
Dave Love <fx@gnu.org>
parents:
diff changeset
645 @end example
Dave Love <fx@gnu.org>
parents:
diff changeset
646
Dave Love <fx@gnu.org>
parents:
diff changeset
647 @noindent
Dave Love <fx@gnu.org>
parents:
diff changeset
648 or quote the elements which are lists, like this:
Dave Love <fx@gnu.org>
parents:
diff changeset
649
Dave Love <fx@gnu.org>
parents:
diff changeset
650 @example
Dave Love <fx@gnu.org>
parents:
diff changeset
651 (setq forms-format-list
Dave Love <fx@gnu.org>
parents:
diff changeset
652 (list
Dave Love <fx@gnu.org>
parents:
diff changeset
653 "====== " forms-file " ======\n\n"
Dave Love <fx@gnu.org>
parents:
diff changeset
654 "User : " 1
Dave Love <fx@gnu.org>
parents:
diff changeset
655 '(make-string 20 ?-)
Dave Love <fx@gnu.org>
parents:
diff changeset
656 @dots{}
Dave Love <fx@gnu.org>
parents:
diff changeset
657 ))
Dave Love <fx@gnu.org>
parents:
diff changeset
658 @end example
Dave Love <fx@gnu.org>
parents:
diff changeset
659
Dave Love <fx@gnu.org>
parents:
diff changeset
660 Forms mode validates the contents of @code{forms-format-list} when you
Dave Love <fx@gnu.org>
parents:
diff changeset
661 visit a database. If there are errors, processing is aborted with an
Dave Love <fx@gnu.org>
parents:
diff changeset
662 error message which includes a descriptive text. @xref{Error Messages},
Dave Love <fx@gnu.org>
parents:
diff changeset
663 for a detailed list of error messages.
Dave Love <fx@gnu.org>
parents:
diff changeset
664
Dave Love <fx@gnu.org>
parents:
diff changeset
665 If no @code{forms-format-list} is specified, Forms mode will supply a
Dave Love <fx@gnu.org>
parents:
diff changeset
666 default format list. This list contains the name of the file being
Dave Love <fx@gnu.org>
parents:
diff changeset
667 visited, and a simple label for each field indicating the field number.
Dave Love <fx@gnu.org>
parents:
diff changeset
668
Dave Love <fx@gnu.org>
parents:
diff changeset
669 @node Modifying Forms Contents
Dave Love <fx@gnu.org>
parents:
diff changeset
670 @chapter Modifying The Forms Contents
Dave Love <fx@gnu.org>
parents:
diff changeset
671
Dave Love <fx@gnu.org>
parents:
diff changeset
672 If @code{forms-read-only} is @code{nil}, the user can modify the fields
Dave Love <fx@gnu.org>
parents:
diff changeset
673 and records of the database.
Dave Love <fx@gnu.org>
parents:
diff changeset
674
Dave Love <fx@gnu.org>
parents:
diff changeset
675 All normal editing commands are available for editing the contents of the
Dave Love <fx@gnu.org>
parents:
diff changeset
676 displayed record. You cannot delete or modify the fixed, explanatory
Dave Love <fx@gnu.org>
parents:
diff changeset
677 text that comes from string formatting elements, but you can modify the
Dave Love <fx@gnu.org>
parents:
diff changeset
678 actual field contents.
Dave Love <fx@gnu.org>
parents:
diff changeset
679
Dave Love <fx@gnu.org>
parents:
diff changeset
680 @ignore
Dave Love <fx@gnu.org>
parents:
diff changeset
681 @c This is for the Emacs 18 version only.
Dave Love <fx@gnu.org>
parents:
diff changeset
682 If the contents of the forms cannot be recognized properly, this is
Dave Love <fx@gnu.org>
parents:
diff changeset
683 signaled using a descriptive text. @xref{Error Messages}, for more info.
Dave Love <fx@gnu.org>
parents:
diff changeset
684 The cursor will indicate the last part of the forms which was
Dave Love <fx@gnu.org>
parents:
diff changeset
685 successfully parsed. It's important to avoid entering field contents
Dave Love <fx@gnu.org>
parents:
diff changeset
686 that would cause confusion with the field-separating fixed text.
Dave Love <fx@gnu.org>
parents:
diff changeset
687 @end ignore
Dave Love <fx@gnu.org>
parents:
diff changeset
688
Dave Love <fx@gnu.org>
parents:
diff changeset
689 If the variable @code{forms-modified-record-filter} is non-@code{nil},
Dave Love <fx@gnu.org>
parents:
diff changeset
690 it is called as a function before the new data is written to the data
Dave Love <fx@gnu.org>
parents:
diff changeset
691 file. The function receives one argument, a vector that contains the
Dave Love <fx@gnu.org>
parents:
diff changeset
692 contents of the fields of the record.
Dave Love <fx@gnu.org>
parents:
diff changeset
693
Dave Love <fx@gnu.org>
parents:
diff changeset
694 The function can refer to fields with @code{aref} and modify them with
Dave Love <fx@gnu.org>
parents:
diff changeset
695 @code{aset}. The first field has number 1 (one); thus, element 0 of the
Dave Love <fx@gnu.org>
parents:
diff changeset
696 vector is not used. The function should return the same vector it was
Dave Love <fx@gnu.org>
parents:
diff changeset
697 passed; the (possibly modified) contents of the vector determine what is
Dave Love <fx@gnu.org>
parents:
diff changeset
698 actually written in the file. Here is an example:
Dave Love <fx@gnu.org>
parents:
diff changeset
699
Dave Love <fx@gnu.org>
parents:
diff changeset
700 @example
Dave Love <fx@gnu.org>
parents:
diff changeset
701 (defun my-modified-record-filter (record)
Dave Love <fx@gnu.org>
parents:
diff changeset
702 ;; @r{Modify second field.}
Dave Love <fx@gnu.org>
parents:
diff changeset
703 (aset record 2 (current-time-string))
Dave Love <fx@gnu.org>
parents:
diff changeset
704 ;; @r{Return the field vector.}
Dave Love <fx@gnu.org>
parents:
diff changeset
705 record)
Dave Love <fx@gnu.org>
parents:
diff changeset
706
Dave Love <fx@gnu.org>
parents:
diff changeset
707 (setq forms-modified-record-filter 'my-modified-record-filter)
Dave Love <fx@gnu.org>
parents:
diff changeset
708 @end example
Dave Love <fx@gnu.org>
parents:
diff changeset
709
Dave Love <fx@gnu.org>
parents:
diff changeset
710 If the variable @code{forms-new-record-filter} is non-@code{nil}, its
Dave Love <fx@gnu.org>
parents:
diff changeset
711 value is a function to be called to fill in default values for the
Dave Love <fx@gnu.org>
parents:
diff changeset
712 fields of a new record. The function is passed a vector of empty
Dave Love <fx@gnu.org>
parents:
diff changeset
713 strings, one for each field; it should return the same vector, with
Dave Love <fx@gnu.org>
parents:
diff changeset
714 the desired field values stored in it. Fields are numbered starting
Dave Love <fx@gnu.org>
parents:
diff changeset
715 from 1 (one). Example:
Dave Love <fx@gnu.org>
parents:
diff changeset
716
Dave Love <fx@gnu.org>
parents:
diff changeset
717 @example
Dave Love <fx@gnu.org>
parents:
diff changeset
718 (defun my-new-record-filter (fields)
Dave Love <fx@gnu.org>
parents:
diff changeset
719 (aset fields 5 (login-name))
Dave Love <fx@gnu.org>
parents:
diff changeset
720 (aset fields 1 (current-time-string))
Dave Love <fx@gnu.org>
parents:
diff changeset
721 fields)
Dave Love <fx@gnu.org>
parents:
diff changeset
722
Dave Love <fx@gnu.org>
parents:
diff changeset
723 (setq forms-new-record-filter 'my-new-record-filter)
Dave Love <fx@gnu.org>
parents:
diff changeset
724 @end example
Dave Love <fx@gnu.org>
parents:
diff changeset
725
Dave Love <fx@gnu.org>
parents:
diff changeset
726 @node Miscellaneous
Dave Love <fx@gnu.org>
parents:
diff changeset
727 @chapter Miscellaneous
Dave Love <fx@gnu.org>
parents:
diff changeset
728
Dave Love <fx@gnu.org>
parents:
diff changeset
729 @vindex forms-version
Dave Love <fx@gnu.org>
parents:
diff changeset
730 The global variable @code{forms-version} holds the version information
Dave Love <fx@gnu.org>
parents:
diff changeset
731 of the Forms mode software.
Dave Love <fx@gnu.org>
parents:
diff changeset
732
Dave Love <fx@gnu.org>
parents:
diff changeset
733 @findex forms-enumerate
Dave Love <fx@gnu.org>
parents:
diff changeset
734 It is very convenient to use symbolic names for the fields in a record.
Dave Love <fx@gnu.org>
parents:
diff changeset
735 The function @code{forms-enumerate} provides an elegant means to define
Dave Love <fx@gnu.org>
parents:
diff changeset
736 a series of variables whose values are consecutive integers. The
Dave Love <fx@gnu.org>
parents:
diff changeset
737 function returns the highest number used, so it can be used to set
Dave Love <fx@gnu.org>
parents:
diff changeset
738 @code{forms-number-of-fields} also. For example:
Dave Love <fx@gnu.org>
parents:
diff changeset
739
Dave Love <fx@gnu.org>
parents:
diff changeset
740 @example
Dave Love <fx@gnu.org>
parents:
diff changeset
741 (setq forms-number-of-fields
Dave Love <fx@gnu.org>
parents:
diff changeset
742 (forms-enumerate
Dave Love <fx@gnu.org>
parents:
diff changeset
743 '(field1 field2 field3 @dots{})))
Dave Love <fx@gnu.org>
parents:
diff changeset
744 @end example
Dave Love <fx@gnu.org>
parents:
diff changeset
745
Dave Love <fx@gnu.org>
parents:
diff changeset
746 This sets @code{field1} to 1, @code{field2} to 2, and so on.
Dave Love <fx@gnu.org>
parents:
diff changeset
747
Dave Love <fx@gnu.org>
parents:
diff changeset
748 Care has been taken to keep the Forms mode variables buffer-local, so it
Dave Love <fx@gnu.org>
parents:
diff changeset
749 is possible to visit multiple files in Forms mode simultaneously, even
Dave Love <fx@gnu.org>
parents:
diff changeset
750 if they have different properties.
Dave Love <fx@gnu.org>
parents:
diff changeset
751
Dave Love <fx@gnu.org>
parents:
diff changeset
752 @findex forms-mode
Dave Love <fx@gnu.org>
parents:
diff changeset
753 If you have visited the control file in normal fashion with
Dave Love <fx@gnu.org>
parents:
diff changeset
754 @code{find-file} or a like command, you can switch to Forms mode with
Dave Love <fx@gnu.org>
parents:
diff changeset
755 the command @code{M-x forms-mode}. If you put @samp{-*- forms -*-} in
Dave Love <fx@gnu.org>
parents:
diff changeset
756 the first line of the control file, then visiting it enables Forms mode
Dave Love <fx@gnu.org>
parents:
diff changeset
757 automatically. But this makes it hard to edit the control file itself,
Dave Love <fx@gnu.org>
parents:
diff changeset
758 so you'd better think twice before using this.
Dave Love <fx@gnu.org>
parents:
diff changeset
759
Dave Love <fx@gnu.org>
parents:
diff changeset
760 The default format for the data file, using @code{"\t"} to separate
Dave Love <fx@gnu.org>
parents:
diff changeset
761 fields and @code{"\^k"} to separate lines within a field, matches the
Dave Love <fx@gnu.org>
parents:
diff changeset
762 file format of some popular database programs, e.g. FileMaker. So
Dave Love <fx@gnu.org>
parents:
diff changeset
763 @code{forms-mode} can decrease the need to use proprietary software.
Dave Love <fx@gnu.org>
parents:
diff changeset
764
Dave Love <fx@gnu.org>
parents:
diff changeset
765 @node Error Messages
Dave Love <fx@gnu.org>
parents:
diff changeset
766 @chapter Error Messages
Dave Love <fx@gnu.org>
parents:
diff changeset
767
Dave Love <fx@gnu.org>
parents:
diff changeset
768 This section describes all error messages which can be generated by
Dave Love <fx@gnu.org>
parents:
diff changeset
769 forms mode. Error messages that result from parsing the control file
Dave Love <fx@gnu.org>
parents:
diff changeset
770 all start with the text @samp{Forms control file error}. Messages
Dave Love <fx@gnu.org>
parents:
diff changeset
771 generated while analyzing the definition of @code{forms-format-list}
Dave Love <fx@gnu.org>
parents:
diff changeset
772 start with @samp{Forms format error}.
Dave Love <fx@gnu.org>
parents:
diff changeset
773
Dave Love <fx@gnu.org>
parents:
diff changeset
774 @table @code
Dave Love <fx@gnu.org>
parents:
diff changeset
775 @item Forms control file error: `forms-file' has not been set
Dave Love <fx@gnu.org>
parents:
diff changeset
776 The variable @code{forms-file} was not set by the control file.
Dave Love <fx@gnu.org>
parents:
diff changeset
777
Dave Love <fx@gnu.org>
parents:
diff changeset
778 @item Forms control file error: `forms-number-of-fields' has not been set
Dave Love <fx@gnu.org>
parents:
diff changeset
779 The variable @code{forms-number-of-fields} was not set by the control
Dave Love <fx@gnu.org>
parents:
diff changeset
780 file.
Dave Love <fx@gnu.org>
parents:
diff changeset
781
Dave Love <fx@gnu.org>
parents:
diff changeset
782 @item Forms control file error: `forms-number-of-fields' must be a number > 0
Dave Love <fx@gnu.org>
parents:
diff changeset
783 The variable @code{forms-number-of-fields} did not contain a positive
Dave Love <fx@gnu.org>
parents:
diff changeset
784 number.
Dave Love <fx@gnu.org>
parents:
diff changeset
785
Dave Love <fx@gnu.org>
parents:
diff changeset
786 @item Forms control file error: `forms-field-sep' is not a string
Dave Love <fx@gnu.org>
parents:
diff changeset
787 @itemx Forms control file error: `forms-multi-line' must be nil or a one-character string
Dave Love <fx@gnu.org>
parents:
diff changeset
788 The variable @code{forms-multi-line} was set to something other than
Dave Love <fx@gnu.org>
parents:
diff changeset
789 @code{nil} or a single-character string.
Dave Love <fx@gnu.org>
parents:
diff changeset
790
Dave Love <fx@gnu.org>
parents:
diff changeset
791 @item Forms control file error: `forms-multi-line' is equal to 'forms-field-sep'
Dave Love <fx@gnu.org>
parents:
diff changeset
792 The variable @code{forms-multi-line} may not be equal to
Dave Love <fx@gnu.org>
parents:
diff changeset
793 @code{forms-field-sep} for this would make it impossible to distinguish
Dave Love <fx@gnu.org>
parents:
diff changeset
794 fields and the lines in the fields.
Dave Love <fx@gnu.org>
parents:
diff changeset
795
Dave Love <fx@gnu.org>
parents:
diff changeset
796 @item Forms control file error: `forms-new-record-filter' is not a function
Dave Love <fx@gnu.org>
parents:
diff changeset
797 @itemx Forms control file error: `forms-modified-record-filter' is not a function
Dave Love <fx@gnu.org>
parents:
diff changeset
798 The variable has been set to something else than a function.
Dave Love <fx@gnu.org>
parents:
diff changeset
799
Dave Love <fx@gnu.org>
parents:
diff changeset
800 @item Forms control file error: `forms-format-list' is not a list
Dave Love <fx@gnu.org>
parents:
diff changeset
801 The variable @code{forms-format-list} was not set to a Lisp list
Dave Love <fx@gnu.org>
parents:
diff changeset
802 by the control file.
Dave Love <fx@gnu.org>
parents:
diff changeset
803
Dave Love <fx@gnu.org>
parents:
diff changeset
804 @item Forms format error: field number @var{xx} out of range 1..@var{nn}
Dave Love <fx@gnu.org>
parents:
diff changeset
805 A field number was supplied in @code{forms-format-list} with a value of
Dave Love <fx@gnu.org>
parents:
diff changeset
806 @var{xx}, which was not greater than zero and smaller than or equal to
Dave Love <fx@gnu.org>
parents:
diff changeset
807 the number of fields in the forms, @var{nn}.
Dave Love <fx@gnu.org>
parents:
diff changeset
808
Dave Love <fx@gnu.org>
parents:
diff changeset
809 @item Forms format error: @var{fun} is not a function
Dave Love <fx@gnu.org>
parents:
diff changeset
810 The first element of a list which is an element of
Dave Love <fx@gnu.org>
parents:
diff changeset
811 @code{forms-format-list} was not a valid Lisp function.
Dave Love <fx@gnu.org>
parents:
diff changeset
812
Dave Love <fx@gnu.org>
parents:
diff changeset
813 @item Forms format error: invalid element @var{xx}
Dave Love <fx@gnu.org>
parents:
diff changeset
814 A list element was supplied in @code{forms-format-list} which was not a
Dave Love <fx@gnu.org>
parents:
diff changeset
815 string, number or list.
Dave Love <fx@gnu.org>
parents:
diff changeset
816
Dave Love <fx@gnu.org>
parents:
diff changeset
817 @ignore
Dave Love <fx@gnu.org>
parents:
diff changeset
818 @c This applies to Emacs 18 only.
Dave Love <fx@gnu.org>
parents:
diff changeset
819 @c Error messages generated while a modified form is being analyzed.
Dave Love <fx@gnu.org>
parents:
diff changeset
820
Dave Love <fx@gnu.org>
parents:
diff changeset
821 @item Parse error: not looking at `...'
Dave Love <fx@gnu.org>
parents:
diff changeset
822 When re-parsing the contents of a forms, the text shown could not
Dave Love <fx@gnu.org>
parents:
diff changeset
823 be found.
Dave Love <fx@gnu.org>
parents:
diff changeset
824
Dave Love <fx@gnu.org>
parents:
diff changeset
825 @item Parse error: cannot find `...'
Dave Love <fx@gnu.org>
parents:
diff changeset
826 When re-parsing the contents of a forms, the text shown, which
Dave Love <fx@gnu.org>
parents:
diff changeset
827 separates two fields, could not be found.
Dave Love <fx@gnu.org>
parents:
diff changeset
828
Dave Love <fx@gnu.org>
parents:
diff changeset
829 @item Parse error: cannot parse adjacent fields @var{xx} and @var{yy}
Dave Love <fx@gnu.org>
parents:
diff changeset
830 Fields @var{xx} and @var{yy} were not separated by text, so could not be
Dave Love <fx@gnu.org>
parents:
diff changeset
831 parsed again.
Dave Love <fx@gnu.org>
parents:
diff changeset
832 @end ignore
Dave Love <fx@gnu.org>
parents:
diff changeset
833
Dave Love <fx@gnu.org>
parents:
diff changeset
834 @item Warning: this record has @var{xx} fields instead of @var{yy}
Dave Love <fx@gnu.org>
parents:
diff changeset
835 The number of fields in this record in the data file did not match
Dave Love <fx@gnu.org>
parents:
diff changeset
836 @code{forms-number-of-fields}. Missing fields will be made empty.
Dave Love <fx@gnu.org>
parents:
diff changeset
837
Dave Love <fx@gnu.org>
parents:
diff changeset
838 @item Multi-line fields in this record - update refused!
Dave Love <fx@gnu.org>
parents:
diff changeset
839 The current record contains newline characters, hence can not be written
Dave Love <fx@gnu.org>
parents:
diff changeset
840 back to the data file, for it would corrupt it. Probably you inserted a
Dave Love <fx@gnu.org>
parents:
diff changeset
841 newline in a field, while @code{forms-multi-line} was @code{nil}.
Dave Love <fx@gnu.org>
parents:
diff changeset
842
Dave Love <fx@gnu.org>
parents:
diff changeset
843 @item Field separator occurs in record - update refused!
Dave Love <fx@gnu.org>
parents:
diff changeset
844 The current record contains the field separator string inside one of the
Dave Love <fx@gnu.org>
parents:
diff changeset
845 fields. It can not be written back to the data file, for it would
Dave Love <fx@gnu.org>
parents:
diff changeset
846 corrupt it. Probably you inserted the field separator string in a field.
Dave Love <fx@gnu.org>
parents:
diff changeset
847
Dave Love <fx@gnu.org>
parents:
diff changeset
848 @item Record number @var{xx} out of range 1..@var{yy}
Dave Love <fx@gnu.org>
parents:
diff changeset
849 A jump was made to non-existing record @var{xx}. @var{yy} denotes the
Dave Love <fx@gnu.org>
parents:
diff changeset
850 number of records in the file.
Dave Love <fx@gnu.org>
parents:
diff changeset
851
Dave Love <fx@gnu.org>
parents:
diff changeset
852 @item Stuck at record @var{xx}
Dave Love <fx@gnu.org>
parents:
diff changeset
853 An internal error prevented a specific record from being retrieved.
Dave Love <fx@gnu.org>
parents:
diff changeset
854
Dave Love <fx@gnu.org>
parents:
diff changeset
855 @item No write access to @code{"}@var{file}@code{"}
Dave Love <fx@gnu.org>
parents:
diff changeset
856 An attempt was made to enable edit mode on a file that has been write
Dave Love <fx@gnu.org>
parents:
diff changeset
857 protected.
Dave Love <fx@gnu.org>
parents:
diff changeset
858
Dave Love <fx@gnu.org>
parents:
diff changeset
859 @item Search failed: @var{regexp}
Dave Love <fx@gnu.org>
parents:
diff changeset
860 The @var{regexp} could not be found in the data file. Forward searching
Dave Love <fx@gnu.org>
parents:
diff changeset
861 is done from the current location until the end of the file, then
Dave Love <fx@gnu.org>
parents:
diff changeset
862 retrying from the beginning of the file until the current location.
Dave Love <fx@gnu.org>
parents:
diff changeset
863 Backward searching is done from the current location until the beginning
Dave Love <fx@gnu.org>
parents:
diff changeset
864 of the file, then retrying from the end of the file until the current
Dave Love <fx@gnu.org>
parents:
diff changeset
865 location.
Dave Love <fx@gnu.org>
parents:
diff changeset
866
Dave Love <fx@gnu.org>
parents:
diff changeset
867 @item Wrapped
Dave Love <fx@gnu.org>
parents:
diff changeset
868 A search completed successfully after wrapping around.
Dave Love <fx@gnu.org>
parents:
diff changeset
869
Dave Love <fx@gnu.org>
parents:
diff changeset
870 @item Warning: number of records changed to @var{nn}
Dave Love <fx@gnu.org>
parents:
diff changeset
871 Forms mode's idea of the number of records has been adjusted to the
Dave Love <fx@gnu.org>
parents:
diff changeset
872 number of records actually present in the data file.
Dave Love <fx@gnu.org>
parents:
diff changeset
873
Dave Love <fx@gnu.org>
parents:
diff changeset
874 @item Problem saving buffers?
Dave Love <fx@gnu.org>
parents:
diff changeset
875 An error occurred while saving the data file buffer. Most likely, Emacs
Dave Love <fx@gnu.org>
parents:
diff changeset
876 did ask to confirm deleting the buffer because it had been modified, and
Dave Love <fx@gnu.org>
parents:
diff changeset
877 you said `no'.
Dave Love <fx@gnu.org>
parents:
diff changeset
878 @end table
Dave Love <fx@gnu.org>
parents:
diff changeset
879
Dave Love <fx@gnu.org>
parents:
diff changeset
880 @node Long Example
Dave Love <fx@gnu.org>
parents:
diff changeset
881 @chapter Long Example
Dave Love <fx@gnu.org>
parents:
diff changeset
882
Dave Love <fx@gnu.org>
parents:
diff changeset
883 The following example exploits most of the features of Forms mode.
Dave Love <fx@gnu.org>
parents:
diff changeset
884 This example is included in the distribution as file @file{forms-d2.el}.
Dave Love <fx@gnu.org>
parents:
diff changeset
885
Dave Love <fx@gnu.org>
parents:
diff changeset
886 @example
Dave Love <fx@gnu.org>
parents:
diff changeset
887 ;; demo2 -- demo forms-mode -*- emacs-lisp -*-
Dave Love <fx@gnu.org>
parents:
diff changeset
888
Dave Love <fx@gnu.org>
parents:
diff changeset
889 ;; @r{This sample forms exploit most of the features of forms mode.}
Dave Love <fx@gnu.org>
parents:
diff changeset
890
Dave Love <fx@gnu.org>
parents:
diff changeset
891 ;; @r{Set the name of the data file.}
Dave Love <fx@gnu.org>
parents:
diff changeset
892 (setq forms-file "forms-d2.dat")
Dave Love <fx@gnu.org>
parents:
diff changeset
893
Dave Love <fx@gnu.org>
parents:
diff changeset
894 ;; @r{Use @code{forms-enumerate} to set field names and number thereof.}
Dave Love <fx@gnu.org>
parents:
diff changeset
895 (setq forms-number-of-fields
Dave Love <fx@gnu.org>
parents:
diff changeset
896 (forms-enumerate
Dave Love <fx@gnu.org>
parents:
diff changeset
897 '(arch-newsgroup ; 1
Dave Love <fx@gnu.org>
parents:
diff changeset
898 arch-volume ; 2
Dave Love <fx@gnu.org>
parents:
diff changeset
899 arch-issue ; and ...
Dave Love <fx@gnu.org>
parents:
diff changeset
900 arch-article ; ... so
Dave Love <fx@gnu.org>
parents:
diff changeset
901 arch-shortname ; ... ... on
Dave Love <fx@gnu.org>
parents:
diff changeset
902 arch-parts
Dave Love <fx@gnu.org>
parents:
diff changeset
903 arch-from
Dave Love <fx@gnu.org>
parents:
diff changeset
904 arch-longname
Dave Love <fx@gnu.org>
parents:
diff changeset
905 arch-keywords
Dave Love <fx@gnu.org>
parents:
diff changeset
906 arch-date
Dave Love <fx@gnu.org>
parents:
diff changeset
907 arch-remarks)))
Dave Love <fx@gnu.org>
parents:
diff changeset
908
Dave Love <fx@gnu.org>
parents:
diff changeset
909 ;; @r{The following functions are used by this form for layout purposes.}
Dave Love <fx@gnu.org>
parents:
diff changeset
910 ;;
Dave Love <fx@gnu.org>
parents:
diff changeset
911 (defun arch-tocol (target &optional fill)
Dave Love <fx@gnu.org>
parents:
diff changeset
912 "Produces a string to skip to column TARGET.
Dave Love <fx@gnu.org>
parents:
diff changeset
913 Prepends newline if needed.
Dave Love <fx@gnu.org>
parents:
diff changeset
914 The optional FILL should be a character, used to fill to the column."
Dave Love <fx@gnu.org>
parents:
diff changeset
915 (if (null fill)
Dave Love <fx@gnu.org>
parents:
diff changeset
916 (setq fill ? ))
Dave Love <fx@gnu.org>
parents:
diff changeset
917 (if (< target (current-column))
Dave Love <fx@gnu.org>
parents:
diff changeset
918 (concat "\n" (make-string target fill))
Dave Love <fx@gnu.org>
parents:
diff changeset
919 (make-string (- target (current-column)) fill)))
Dave Love <fx@gnu.org>
parents:
diff changeset
920 ;;
Dave Love <fx@gnu.org>
parents:
diff changeset
921 (defun arch-rj (target field &optional fill)
Dave Love <fx@gnu.org>
parents:
diff changeset
922 "Produces a string to skip to column TARGET\
Dave Love <fx@gnu.org>
parents:
diff changeset
923 minus the width of field FIELD.
Dave Love <fx@gnu.org>
parents:
diff changeset
924 Prepends newline if needed.
Dave Love <fx@gnu.org>
parents:
diff changeset
925 The optional FILL should be a character,
Dave Love <fx@gnu.org>
parents:
diff changeset
926 used to fill to the column."
Dave Love <fx@gnu.org>
parents:
diff changeset
927 (arch-tocol (- target (length (nth field forms-fields))) fill))
Dave Love <fx@gnu.org>
parents:
diff changeset
928
Dave Love <fx@gnu.org>
parents:
diff changeset
929 ;; @r{Record filters.}
Dave Love <fx@gnu.org>
parents:
diff changeset
930 ;;
Dave Love <fx@gnu.org>
parents:
diff changeset
931 (defun new-record-filter (the-record)
Dave Love <fx@gnu.org>
parents:
diff changeset
932 "Form a new record with some defaults."
Dave Love <fx@gnu.org>
parents:
diff changeset
933 (aset the-record arch-from (user-full-name))
Dave Love <fx@gnu.org>
parents:
diff changeset
934 (aset the-record arch-date (current-time-string))
Dave Love <fx@gnu.org>
parents:
diff changeset
935 the-record) ; return it
Dave Love <fx@gnu.org>
parents:
diff changeset
936 (setq forms-new-record-filter 'new-record-filter)
Dave Love <fx@gnu.org>
parents:
diff changeset
937
Dave Love <fx@gnu.org>
parents:
diff changeset
938 ;; @r{The format list.}
Dave Love <fx@gnu.org>
parents:
diff changeset
939 (setq forms-format-list
Dave Love <fx@gnu.org>
parents:
diff changeset
940 (list
Dave Love <fx@gnu.org>
parents:
diff changeset
941 "====== Public Domain Software Archive ======\n\n"
Dave Love <fx@gnu.org>
parents:
diff changeset
942 arch-shortname
Dave Love <fx@gnu.org>
parents:
diff changeset
943 " - " arch-longname
Dave Love <fx@gnu.org>
parents:
diff changeset
944 "\n\n"
Dave Love <fx@gnu.org>
parents:
diff changeset
945 "Article: " arch-newsgroup
Dave Love <fx@gnu.org>
parents:
diff changeset
946 "/" arch-article
Dave Love <fx@gnu.org>
parents:
diff changeset
947 " "
Dave Love <fx@gnu.org>
parents:
diff changeset
948 '(arch-tocol 40)
Dave Love <fx@gnu.org>
parents:
diff changeset
949 "Issue: " arch-issue
Dave Love <fx@gnu.org>
parents:
diff changeset
950 " "
Dave Love <fx@gnu.org>
parents:
diff changeset
951 '(arch-rj 73 10)
Dave Love <fx@gnu.org>
parents:
diff changeset
952 "Date: " arch-date
Dave Love <fx@gnu.org>
parents:
diff changeset
953 "\n\n"
Dave Love <fx@gnu.org>
parents:
diff changeset
954 "Submitted by: " arch-from
Dave Love <fx@gnu.org>
parents:
diff changeset
955 "\n"
Dave Love <fx@gnu.org>
parents:
diff changeset
956 '(arch-tocol 79 ?-)
Dave Love <fx@gnu.org>
parents:
diff changeset
957 "\n"
Dave Love <fx@gnu.org>
parents:
diff changeset
958 "Keywords: " arch-keywords
Dave Love <fx@gnu.org>
parents:
diff changeset
959 "\n\n"
Dave Love <fx@gnu.org>
parents:
diff changeset
960 "Parts: " arch-parts
Dave Love <fx@gnu.org>
parents:
diff changeset
961 "\n\n====== Remarks ======\n\n"
Dave Love <fx@gnu.org>
parents:
diff changeset
962 arch-remarks
Dave Love <fx@gnu.org>
parents:
diff changeset
963 ))
Dave Love <fx@gnu.org>
parents:
diff changeset
964
Dave Love <fx@gnu.org>
parents:
diff changeset
965 ;; @r{That's all, folks!}
Dave Love <fx@gnu.org>
parents:
diff changeset
966 @end example
Dave Love <fx@gnu.org>
parents:
diff changeset
967
Dave Love <fx@gnu.org>
parents:
diff changeset
968 @node Credits
Dave Love <fx@gnu.org>
parents:
diff changeset
969 @chapter Credits
Dave Love <fx@gnu.org>
parents:
diff changeset
970
Dave Love <fx@gnu.org>
parents:
diff changeset
971 Bug fixes and other useful suggestions were supplied by
Dave Love <fx@gnu.org>
parents:
diff changeset
972 Harald Hanche-Olsen (@code{hanche@@imf.unit.no}),
Dave Love <fx@gnu.org>
parents:
diff changeset
973 @code{cwitty@@portia.stanford.edu},
Dave Love <fx@gnu.org>
parents:
diff changeset
974 Jonathan I. Kamens,
Dave Love <fx@gnu.org>
parents:
diff changeset
975 Per Cederqvist (@code{ceder@@signum.se}),
Dave Love <fx@gnu.org>
parents:
diff changeset
976 Michael Lipka (@code{lipka@@lip.hanse.de}),
Dave Love <fx@gnu.org>
parents:
diff changeset
977 Andy Piper (@code{ajp@@eng.cam.ac.uk}),
Dave Love <fx@gnu.org>
parents:
diff changeset
978 Frederic Pierresteguy (@code{F.Pierresteguy@@frcl.bull.fr}),
Dave Love <fx@gnu.org>
parents:
diff changeset
979 Ignatios Souvatzis
Dave Love <fx@gnu.org>
parents:
diff changeset
980 and Richard Stallman (@code{rms@@gnu.org}).
Dave Love <fx@gnu.org>
parents:
diff changeset
981
Dave Love <fx@gnu.org>
parents:
diff changeset
982 This documentation was slightly inspired by the documentation of ``rolo
Dave Love <fx@gnu.org>
parents:
diff changeset
983 mode'' by Paul Davis at Schlumberger Cambridge Research
Dave Love <fx@gnu.org>
parents:
diff changeset
984 (@code{davis%scrsu1%sdr.slb.com@@relay.cs.net}).
Dave Love <fx@gnu.org>
parents:
diff changeset
985
Dave Love <fx@gnu.org>
parents:
diff changeset
986 None of this would have been possible without GNU Emacs of the Free
Dave Love <fx@gnu.org>
parents:
diff changeset
987 Software Foundation. Thanks, Richard!
Dave Love <fx@gnu.org>
parents:
diff changeset
988
Dave Love <fx@gnu.org>
parents:
diff changeset
989 @node Index
Dave Love <fx@gnu.org>
parents:
diff changeset
990 @unnumbered Index
Dave Love <fx@gnu.org>
parents:
diff changeset
991 @printindex cp
Dave Love <fx@gnu.org>
parents:
diff changeset
992
Dave Love <fx@gnu.org>
parents:
diff changeset
993 @contents
Dave Love <fx@gnu.org>
parents:
diff changeset
994 @bye