source: trunk/third/ispell/ispell.texinfo @ 10334

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