0
|
1 \input texinfo @c -*-texinfo-*-
|
|
2 @comment %**start of header (This is for running Texinfo on a region.)
|
50
|
3 @setfilename ispell.info
|
0
|
4 @settitle ISPELL V3.1
|
|
5 @comment %**end of header (This is for running Texinfo on a region.)
|
|
6
|
|
7 @iftex
|
|
8 @finalout
|
|
9 @end iftex
|
|
10
|
|
11 @ifinfo
|
|
12 This file documents ISPELL, an interactive spelling corrector.
|
|
13
|
|
14 Copyright 1988, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
|
|
15
|
|
16 Permission is granted to make and distribute verbatim copies of
|
|
17 this manual provided the copyright notice and this permission notice
|
|
18 are preserved on all copies.
|
|
19
|
|
20 @ignore
|
|
21 Permission is granted to process this file through TeX and print the
|
|
22 results, provided the printed document carries copying permission
|
|
23 notice identical to this one except for the removal of this paragraph
|
|
24 (this paragraph not being relevant to the printed manual).
|
|
25
|
|
26 @end ignore
|
|
27 Permission is granted to copy and distribute modified versions of this
|
|
28 manual under the conditions for verbatim copying, provided that the entire
|
|
29 resulting derived work is distributed under the terms of a permission
|
|
30 notice identical to this one.
|
|
31
|
|
32 Permission is granted to copy and distribute translations of this manual
|
|
33 into another language, under the above conditions for modified versions,
|
|
34 except that this permission notice may be stated in a translation approved
|
|
35 by the Foundation.
|
|
36 @end ifinfo
|
|
37
|
|
38 @setchapternewpage odd
|
|
39 @titlepage
|
|
40 @sp 11
|
|
41 @center @titlefont{ISPELL}
|
|
42 @sp 2
|
|
43 @center by Pace Willisson and Geoff Kuenning
|
|
44 @sp 2
|
|
45 @center Version 3.1
|
|
46 @sp 2
|
|
47 @center December 1993
|
|
48
|
|
49 @comment Include the Distribution inside the titlepage environment so
|
|
50 @c that headings are turned off.
|
|
51
|
|
52 @page
|
|
53 @vskip 0pt plus 1filll
|
|
54 Copyright @copyright{} 1988, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
|
|
55
|
|
56 Published by Geoffrey H. Kuenning @*
|
|
57 12840 Winthrop Ave., @*
|
|
58 Granada Hills, CA 91344-1221 USA
|
|
59 @vskip 0pt plus 1filll
|
|
60
|
|
61 Permission is granted to make and distribute verbatim copies of
|
|
62 this manual provided the copyright notice and this permission notice
|
|
63 are preserved on all copies.
|
|
64
|
|
65 Permission is granted to copy and distribute modified versions of this
|
|
66 manual under the conditions for verbatim copying, provided that the entire
|
|
67 resulting derived work is distributed under the terms of a permission
|
|
68 notice identical to this one.
|
|
69
|
|
70 Permission is granted to copy and distribute translations of this manual
|
|
71 into another language, under the above conditions for modified versions,
|
|
72 except that this permission notice may be stated in a translation approved
|
|
73 by the Foundation.
|
|
74
|
|
75 @end titlepage
|
50
|
76 @node Top, Emacs, (dir), (dir)
|
|
77
|
0
|
78 @menu
|
|
79 * Emacs:: Using ispell from emacs
|
|
80 * Old Emacs:: Old Emacs
|
|
81 * Private:: Your private dictionary
|
|
82 * Command summary:: All commands in emacs mode
|
|
83 * Near misses:: Definition of a near miss
|
|
84 * History:: Where it came from
|
|
85
|
|
86 --- The Detailed Node Listing ---
|
|
87
|
|
88 Using ispell from emacs
|
|
89
|
|
90 * Word:: Checking a single word
|
|
91 * Buffer:: Checking a whole buffer
|
|
92 * Region:: Checking a region
|
|
93 * Multiple Dictionaries:: Using Multiple Dictionaries
|
|
94 @end menu
|
|
95
|
|
96
|
|
97 @iftex
|
|
98 @chapter ISPELL
|
|
99 @code{Ispell} is a program that helps you to correct spelling and
|
|
100 typographical errors in a file. When presented with a word that is not
|
|
101 in the dictionary, @code{ispell} attempts to find @dfn{near misses} that
|
|
102 might include the word you meant.
|
|
103
|
|
104 This manual describes how to use @code{ispell} from within @code{emacs}.
|
|
105 Other information about @code{ispell} is available from the @code{Unix}
|
|
106 manual pages.
|
|
107 @end iftex
|
|
108
|
|
109 @ifinfo
|
|
110
|
|
111 @code{Ispell} is a program that helps you to correct spelling errors in
|
|
112 a file, and to find the correct spelling of words. When presented with
|
|
113 a word that is not in the dictionary, @code{ispell} attempts to find
|
|
114 @dfn{near misses} that might include the word you meant.
|
|
115
|
|
116 This manual describes how to use ispell, as well as a little about
|
|
117 its implementation.
|
|
118
|
|
119 @end ifinfo
|
|
120
|
|
121 @menu
|
|
122 * Emacs:: Using ispell from emacs
|
|
123 * Old Emacs:: Old Emacs
|
|
124 * Private:: Your private dictionary
|
|
125 * Command summary:: All commands in emacs mode
|
|
126 * Near misses:: Definition of a near miss
|
|
127 * History:: Where it came from
|
|
128
|
|
129 @end menu
|
|
130
|
|
131 @node Emacs, Old Emacs, Top, Top
|
|
132 @section Using ispell from emacs
|
|
133
|
|
134 @menu
|
|
135 * Word:: Checking a single word
|
|
136 * Buffer:: Checking a whole buffer
|
|
137 * Region:: Checking a region
|
|
138 * Multiple Dictionaries:: Using Multiple Dictionaries
|
|
139 @end menu
|
|
140
|
|
141 @node Word, Buffer, Emacs, Emacs
|
|
142 @subsection Checking a single word
|
|
143
|
|
144 The simplest emacs command for calling ispell is 'M-$' (meta-dollar. On
|
|
145 some terminals, you must type ESC-$.) This checks the spelling of the
|
|
146 word under the cursor. If the word is found in the dictionary, then a
|
|
147 message is printed in the echo area. Otherwise, ISPELL attempts to
|
|
148 generate near misses.
|
|
149
|
|
150 If any near misses are found, they are displayed in a separate window,
|
|
151 each preceded by a digit or character. If one of these is the word you
|
|
152 wanted, just type its digit or character, and it will replace the
|
|
153 original word in your buffer.
|
|
154
|
|
155 If no near miss is right, or if none are displayed, you have five
|
|
156 choices:
|
|
157
|
|
158 @table @kbd
|
|
159 @item I
|
|
160
|
|
161 Insert the word in your private dictionary. Use this if you know that
|
|
162 the word is spelled correctly.
|
|
163
|
|
164 @item A
|
|
165
|
|
166 Accept the word for the duration of this editing session, but do not put
|
|
167 it in your private dictionary. Use this if you are not sure about the
|
|
168 spelling of the word, but you do not want to look it up immediately, or
|
|
169 for terms that appear in your document but are not truly words. The
|
|
170 next time you start ispell, it will have forgotten any accepted words.
|
|
171
|
|
172 @item SPC
|
|
173
|
|
174 Leave the word alone, and consider it misspelled if it is checked again.
|
|
175
|
|
176 @item R
|
|
177
|
|
178 Replace the word. This command prompts you for a string in the
|
|
179 minibuffer. You may type more than one word, and each word you type
|
|
180 is checked again, possibly finding other near misses. This command
|
|
181 provides a handy way to close in on a word that you have no idea how
|
|
182 to spell. You can keep trying different spellings until you find one
|
|
183 that is close enough to get a near miss.
|
|
184
|
|
185 @item L
|
|
186
|
|
187 Lookup. Display words from the dictionary that contain a
|
|
188 specified substring. The substring is a regular expression,
|
|
189 which means it can contain special characters to be more
|
|
190 selective about which words get displayed.
|
|
191 @xref{Regexps, Regexps, Regexps, emacs, emacs}. @refill
|
|
192
|
|
193 If the only special character in the regular expression is a leading
|
|
194 @code{^}, then a very fast binary search will be used, instead of
|
|
195 scanning the whole file.
|
|
196
|
|
197 Only a few matching words can be displayed in the ISPELL window.
|
|
198 If you want to see more, use the @code{look} program directly from
|
|
199 the shell.
|
|
200 @end table
|
|
201
|
|
202 Of course, you can also type @kbd{@ctrl{G}} to stop the command without
|
|
203 changing anything.
|
|
204
|
|
205 If you make a change that you don't like, just use emacs' normal undo
|
|
206 feature @xref{undo, undo, undo, emacs, emacs}.
|
|
207
|
|
208 @node Buffer, Region, Word, Emacs
|
|
209 @subsection Checking a whole buffer
|
|
210
|
|
211 If you want to check the spelling of all the words in a buffer, type
|
|
212 the command @kbd{M-x ispell-buffer}. This command scans the file, and makes
|
|
213 a list of all the misspelled words. When it is done, it moves the
|
|
214 cursor to the first word on the list, and acts like you just typed M-$
|
|
215 @xref{Word}.
|
|
216
|
|
217 When you finish with one word, the cursor is automatically moved to the
|
|
218 next. If you want to stop in the middle of the list type @kbd{X} or
|
|
219 @kbd{@ctrl{G}}.
|
|
220
|
|
221 @node Region, Multiple Dictionaries, Buffer, Emacs
|
|
222 @subsection Checking a region
|
|
223
|
|
224 You may check the words in the region with the command @kbd{M-x ispell-region}.
|
|
225 See @xref{mark, mark, mark, emacs, emacs}.
|
|
226
|
|
227 The commands available are the same as for checking a whole buffer.
|
|
228
|
|
229 @node Multiple Dictionaries, , Region, Emacs
|
|
230 @subsection Using Multiple Dictionaries
|
|
231
|
|
232 Your site may have multiple dictionaries installed: a default one
|
|
233 (usually @file{english.hash}), and several others for different
|
|
234 languages (e.g. @file{deutsch.hash}) or variations on a language (such as
|
|
235 British spelling for English).
|
|
236
|
|
237 @table @code
|
|
238
|
|
239 @item ispell-change-dictionary
|
|
240 @findex ispell-change-dictionary
|
|
241
|
|
242 This is the command to change the dictionary. It prompts for a new
|
|
243 dictionary name, with completion on the elements of @code{ispell-dictionary}.
|
|
244
|
|
245 It changes @code{ispell-dictionary} and kills the old ispell process, if
|
|
246 one was running. A new one will be started as soon as necessary.
|
|
247
|
|
248 By just answering @kbd{RET} you can find out what the current dictionary
|
|
249 is.
|
|
250
|
|
251 @item ispell-dictionary
|
|
252 @vindex ispell-dictionary
|
|
253
|
|
254 If non-nil, a dictionary to use instead of the default one.
|
|
255 This is passed to the ispell process using the @code{-d} switch and is
|
|
256 used as key in @code{ispell-dictionary-alist}.
|
|
257
|
|
258 You should set this variable before your first call to ispell (e.g. in
|
|
259 your @file{.emacs}), or use the @kbd{M-x ispell-change-dictionary}
|
|
260 command to change it, as changing this variable only takes effect in a
|
|
261 newly started ispell process.
|
|
262
|
|
263 @item ispell-dictionary-alist
|
|
264 @vindex ispell-dictionary-alist
|
|
265
|
|
266 An alist of dictionaries and their associated parameters.
|
|
267
|
|
268 Each element of this list is also a list:
|
|
269
|
|
270 @example
|
|
271 (@var{dictionary-name}
|
|
272 @var{casechars} @var{not-casechars} @var{otherchars} @var{many-otherchars-p}
|
|
273 @var{ispell-args})
|
|
274 @end example
|
|
275
|
|
276 @var{dictionary-name} is a possible value of variable
|
|
277 @code{ispell-dictionary}, @code{nil} means the default dictionary.
|
|
278
|
|
279 @var{casechars} is a regular expression of valid characters that
|
|
280 comprise a word.
|
|
281
|
|
282 @var{not-casechars} is the opposite regexp of @var{casechars}.
|
|
283
|
|
284 @var{otherchars} is a regular expression of other characters that are
|
|
285 valid in word constructs. Otherchars cannot be adjacent to each other
|
|
286 in a word, nor can they begin or end a word. This implies we can't
|
|
287 check @samp{Stevens'} as a correct possessive and other correct
|
|
288 formations.
|
|
289
|
|
290 Hint: regexp syntax requires the hyphen to be declared first here.
|
|
291
|
|
292 @var{many-otherchars-p} is non-nil if many otherchars are to be allowed
|
|
293 in a word instead of only one.
|
|
294
|
|
295 @var{ispell-args} is a list of additional arguments passed to the ispell
|
|
296 subprocess.
|
|
297
|
|
298 Note that the @var{casechars} and @var{otherchars} slots of the alist should
|
|
299 contain the same character set as casechars and otherchars in the
|
|
300 @var{language}@file{.aff} file (e.g., @file{english.aff}).
|
|
301
|
|
302 @end table
|
|
303
|
|
304 @node Old Emacs, Private, Emacs, Top
|
|
305 @section Old Emacs
|
|
306
|
|
307 Until ispell becomes part of the standard emacs distribution, you will
|
|
308 have to explicitly request that it be loaded. Put the following lines
|
|
309 in your emacs init file @xref{init file,, init file, emacs, emacs}.
|
|
310
|
|
311 @example
|
|
312 (autoload 'ispell-word "ispell" "Check the spelling of word in buffer." t)
|
|
313 (autoload 'ispell-region "ispell" "Check the spelling of region." t)
|
|
314 (autoload 'ispell-buffer "ispell" "Check the spelling of buffer." t)
|
|
315 (global-set-key "\e$" 'ispell-word)
|
|
316 @end example
|
|
317
|
|
318 (It will do no harm to have these lines in your init file even after
|
|
319 ispell is installed by default.)
|
|
320
|
|
321 @node Private, Command summary, Old Emacs, Top
|
|
322 @section Your private dictionary
|
|
323
|
|
324 Whenever ispell is started the file @file{.ispell_words} is read from
|
|
325 your home directory (if it exists). This file contains a list of words,
|
|
326 one per line. The order of the words is not important, but the case is.
|
|
327 Ispell will consider all of the words good, and will use them as
|
|
328 possible near misses.
|
|
329
|
|
330 The @kbd{I} command adds words to @file{.ispell_words}, so normally you
|
|
331 don't have to worry about the file. You may want to check it from
|
|
332 time to time to make sure you have not accidentally inserted a
|
|
333 misspelled word.
|
|
334
|
|
335 @node Command summary, Near misses, Private, Top
|
|
336 @section All commands in emacs mode
|
|
337
|
|
338 @table @kbd
|
|
339 @item DIGIT
|
|
340 Select a near miss
|
|
341 @item I
|
|
342 Insert into private dictionary
|
|
343 @item A
|
|
344 Accept for this session
|
|
345 @item SPC
|
|
346 Skip this time
|
|
347 @item R
|
|
348 Replace with one or more words
|
|
349 @item L
|
|
350 Lookup: search the dictionary using a regular expression
|
|
351 @item M-$
|
|
352 Check word
|
|
353 @item M-x ispell-buffer
|
|
354 Check buffer
|
|
355 @item M-x ispell-region
|
|
356 Check region
|
|
357 @item M-x ispell-change-dictionary
|
|
358 Select different dictionary.
|
|
359 @end table
|
|
360
|
|
361 @node Near misses, History, Command summary, Top
|
|
362 @section Definition of a near miss
|
|
363
|
|
364 Two words are near each other if they can be made identical with one
|
|
365 of the following changes to one of the words:
|
|
366
|
|
367 @example
|
|
368 Insert a blank space
|
|
369 Interchange two adjacent letters.
|
|
370 Change one letter.
|
|
371 Delete one letter.
|
|
372 Add one letter.
|
|
373 @end example
|
|
374
|
|
375 Someday, perhaps ispell will be extended so that words that sound
|
|
376 alike would also be considered near misses. If you would like to
|
|
377 implement this, see Knuth, Volume 3, page 392 for a description of the
|
|
378 Soundex algorithm which might apply.
|
|
379
|
|
380 @node History, , Near misses, Top
|
|
381 @section Where it came from
|
|
382
|
|
383 Ispell has a long and convoluted history. Originally called SPELL, it
|
|
384 was written by Ralph E. Gorin in 1971. That version was written in
|
|
385 assembly language for the DEC PDP-10 to run under the WAITS operating
|
|
386 system at the Stanford Artificial Intelligence Laboratory. Subsequent
|
|
387 versions, also in PDP-10 assembly language, were developed for the BBN
|
|
388 TENEX, MIT ITS, and DEC TOPS-10 and TOPS-20 operating systems. It was
|
|
389 later revised by W. E. Matson (1974), and W. B. Ackerman (1978),
|
|
390 changing its name to ISPELL in the process.
|
|
391
|
|
392 In 1983, Pace Willisson (pace@@ai.mit.edu) converted this version to
|
|
393 the C language and modified it to work under Unix.
|
|
394
|
|
395 In 1987, Walt Buehring revised and enhanced ispell, and posted it to the
|
|
396 Usenet along with a dictionary. In addition, Walt wrote the first version
|
|
397 of "ispell.el", the emacs interface.
|
|
398
|
|
399 Geoff Kuenning (geoff@@ITcorp.com, that's me, and by the way I pronounce
|
|
400 it "Kenning") picked up this version, fixed many bugs, and added further
|
|
401 enhancements. In 1988 I got ambitious and rewrote major portions of the
|
|
402 code, resulting in the table-driven multi-lingual version. Ken Stevens
|
|
403 (stevens@@hplabs.hp.com) made overwhelming contributions to the elisp
|
|
404 support to produce the version you are using now.
|
|
405
|
|
406 Due to a misunderstanding involving the Free Software Foundation, it
|
|
407 later became necessary to rename this version to ispell to avoid
|
|
408 confusion on the part of users.
|
|
409
|
|
410 Many other enhancements and bug fixes were provided by other people.
|
|
411 Although I omit mention here due to space, many of these people have
|
|
412 also made significant contributions to the version of ispell you see
|
|
413 here. For a full list of people who have contributed to ispell, refer
|
|
414 to the file @file{Contributors} which is distributed with the ispell
|
|
415 sources.
|
|
416
|
|
417 @noindent
|
|
418 Geoff Kuenning @*
|
|
419 geoff@@ITcorp.com @*
|
|
420
|
|
421 @contents
|
|
422
|
|
423 @bye
|