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 |
---|
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 |
---|
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 | |
---|
86 | Using 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 |
---|
99 | typographical errors in a file. When presented with a word that is not |
---|
100 | in the dictionary, @code{ispell} attempts to find @dfn{near misses} that |
---|
101 | might include the word you meant. |
---|
102 | |
---|
103 | This manual describes how to use @code{ispell} from within @code{emacs}. |
---|
104 | Other information about @code{ispell} is available from the @code{Unix} |
---|
105 | manual pages. |
---|
106 | @end iftex |
---|
107 | |
---|
108 | @ifinfo |
---|
109 | |
---|
110 | @code{Ispell} is a program that helps you to correct spelling errors in |
---|
111 | a file, and to find the correct spelling of words. When presented with |
---|
112 | a word that is not in the dictionary, @code{ispell} attempts to find |
---|
113 | @dfn{near misses} that might include the word you meant. |
---|
114 | |
---|
115 | This manual describes how to use ispell, as well as a little about |
---|
116 | its 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 | |
---|
143 | The simplest emacs command for calling ispell is 'M-$' (meta-dollar. On |
---|
144 | some terminals, you must type ESC-$.) This checks the spelling of the |
---|
145 | word under the cursor. If the word is found in the dictionary, then a |
---|
146 | message is printed in the echo area. Otherwise, ISPELL attempts to |
---|
147 | generate near misses. |
---|
148 | |
---|
149 | If any near misses are found, they are displayed in a separate window, |
---|
150 | each preceded by a digit or character. If one of these is the word you |
---|
151 | wanted, just type its digit or character, and it will replace the |
---|
152 | original word in your buffer. |
---|
153 | |
---|
154 | If no near miss is right, or if none are displayed, you have five |
---|
155 | choices: |
---|
156 | |
---|
157 | @table @kbd |
---|
158 | @item I |
---|
159 | |
---|
160 | Insert the word in your private dictionary. Use this if you know that |
---|
161 | the word is spelled correctly. |
---|
162 | |
---|
163 | @item A |
---|
164 | |
---|
165 | Accept the word for the duration of this editing session, but do not put |
---|
166 | it in your private dictionary. Use this if you are not sure about the |
---|
167 | spelling of the word, but you do not want to look it up immediately, or |
---|
168 | for terms that appear in your document but are not truly words. The |
---|
169 | next time you start ispell, it will have forgotten any accepted words. |
---|
170 | |
---|
171 | @item SPC |
---|
172 | |
---|
173 | Leave the word alone, and consider it misspelled if it is checked again. |
---|
174 | |
---|
175 | @item R |
---|
176 | |
---|
177 | Replace the word. This command prompts you for a string in the |
---|
178 | minibuffer. You may type more than one word, and each word you type |
---|
179 | is checked again, possibly finding other near misses. This command |
---|
180 | provides a handy way to close in on a word that you have no idea how |
---|
181 | to spell. You can keep trying different spellings until you find one |
---|
182 | that is close enough to get a near miss. |
---|
183 | |
---|
184 | @item L |
---|
185 | |
---|
186 | Lookup. Display words from the dictionary that contain a |
---|
187 | specified substring. The substring is a regular expression, |
---|
188 | which means it can contain special characters to be more |
---|
189 | selective about which words get displayed. |
---|
190 | @xref{Regexps, Regexps, Regexps, emacs, emacs}. @refill |
---|
191 | |
---|
192 | If the only special character in the regular expression is a leading |
---|
193 | @code{^}, then a very fast binary search will be used, instead of |
---|
194 | scanning the whole file. |
---|
195 | |
---|
196 | Only a few matching words can be displayed in the ISPELL window. |
---|
197 | If you want to see more, use the @code{look} program directly from |
---|
198 | the shell. |
---|
199 | @end table |
---|
200 | |
---|
201 | Of course, you can also type @kbd{@ctrl{G}} to stop the command without |
---|
202 | changing anything. |
---|
203 | |
---|
204 | If you make a change that you don't like, just use emacs' normal undo |
---|
205 | feature @xref{undo, undo, undo, emacs, emacs}. |
---|
206 | |
---|
207 | @node Buffer, Region, Word, Emacs |
---|
208 | @subsection Checking a whole buffer |
---|
209 | |
---|
210 | If you want to check the spelling of all the words in a buffer, type |
---|
211 | the command @kbd{M-x ispell-buffer}. This command scans the file, and makes |
---|
212 | a list of all the misspelled words. When it is done, it moves the |
---|
213 | cursor to the first word on the list, and acts like you just typed M-$ |
---|
214 | @xref{Word}. |
---|
215 | |
---|
216 | When you finish with one word, the cursor is automatically moved to the |
---|
217 | next. 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 | |
---|
223 | You may check the words in the region with the command @kbd{M-x ispell-region}. |
---|
224 | See @xref{mark, mark, mark, emacs, emacs}. |
---|
225 | |
---|
226 | The commands available are the same as for checking a whole buffer. |
---|
227 | |
---|
228 | @node Multiple Dictionaries, , Region, Emacs |
---|
229 | @subsection Using Multiple Dictionaries |
---|
230 | |
---|
231 | Your site may have multiple dictionaries installed: a default one |
---|
232 | (usually @file{english.hash}), and several others for different |
---|
233 | languages (e.g. @file{deutsch.hash}) or variations on a language (such as |
---|
234 | British spelling for English). |
---|
235 | |
---|
236 | @table @code |
---|
237 | |
---|
238 | @item ispell-change-dictionary |
---|
239 | @findex ispell-change-dictionary |
---|
240 | |
---|
241 | This is the command to change the dictionary. It prompts for a new |
---|
242 | dictionary name, with completion on the elements of @code{ispell-dictionary}. |
---|
243 | |
---|
244 | It changes @code{ispell-dictionary} and kills the old ispell process, if |
---|
245 | one was running. A new one will be started as soon as necessary. |
---|
246 | |
---|
247 | By just answering @kbd{RET} you can find out what the current dictionary |
---|
248 | is. |
---|
249 | |
---|
250 | @item ispell-dictionary |
---|
251 | @vindex ispell-dictionary |
---|
252 | |
---|
253 | If non-nil, a dictionary to use instead of the default one. |
---|
254 | This is passed to the ispell process using the @code{-d} switch and is |
---|
255 | used as key in @code{ispell-dictionary-alist}. |
---|
256 | |
---|
257 | You should set this variable before your first call to ispell (e.g. in |
---|
258 | your @file{.emacs}), or use the @kbd{M-x ispell-change-dictionary} |
---|
259 | command to change it, as changing this variable only takes effect in a |
---|
260 | newly started ispell process. |
---|
261 | |
---|
262 | @item ispell-dictionary-alist |
---|
263 | @vindex ispell-dictionary-alist |
---|
264 | |
---|
265 | An alist of dictionaries and their associated parameters. |
---|
266 | |
---|
267 | Each 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 |
---|
279 | comprise 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 |
---|
284 | valid in word constructs. Otherchars cannot be adjacent to each other |
---|
285 | in a word, nor can they begin or end a word. This implies we can't |
---|
286 | check @samp{Stevens'} as a correct possessive and other correct |
---|
287 | formations. |
---|
288 | |
---|
289 | Hint: 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 |
---|
292 | in a word instead of only one. |
---|
293 | |
---|
294 | @var{ispell-args} is a list of additional arguments passed to the ispell |
---|
295 | subprocess. |
---|
296 | |
---|
297 | Note that the @var{casechars} and @var{otherchars} slots of the alist should |
---|
298 | contain 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 | |
---|
306 | Until ispell becomes part of the standard emacs distribution, you will |
---|
307 | have to explicitly request that it be loaded. Put the following lines |
---|
308 | in 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 |
---|
318 | ispell is installed by default.) |
---|
319 | |
---|
320 | @node Private, Command summary, Old Emacs, Top |
---|
321 | @section Your private dictionary |
---|
322 | |
---|
323 | Whenever ispell is started the file @file{.ispell_words} is read from |
---|
324 | your home directory (if it exists). This file contains a list of words, |
---|
325 | one per line. The order of the words is not important, but the case is. |
---|
326 | Ispell will consider all of the words good, and will use them as |
---|
327 | possible near misses. |
---|
328 | |
---|
329 | The @kbd{I} command adds words to @file{.ispell_words}, so normally you |
---|
330 | don't have to worry about the file. You may want to check it from |
---|
331 | time to time to make sure you have not accidentally inserted a |
---|
332 | misspelled word. |
---|
333 | |
---|
334 | @node Command summary, Near misses, Private, Top |
---|
335 | @section All commands in emacs mode |
---|
336 | |
---|
337 | @table @kbd |
---|
338 | @item DIGIT |
---|
339 | Select a near miss |
---|
340 | @item I |
---|
341 | Insert into private dictionary |
---|
342 | @item A |
---|
343 | Accept for this session |
---|
344 | @item SPC |
---|
345 | Skip this time |
---|
346 | @item R |
---|
347 | Replace with one or more words |
---|
348 | @item L |
---|
349 | Lookup: search the dictionary using a regular expression |
---|
350 | @item M-$ |
---|
351 | Check word |
---|
352 | @item M-x ispell-buffer |
---|
353 | Check buffer |
---|
354 | @item M-x ispell-region |
---|
355 | Check region |
---|
356 | @item M-x ispell-change-dictionary |
---|
357 | Select different dictionary. |
---|
358 | @end table |
---|
359 | |
---|
360 | @node Near misses, History, Command summary, Top |
---|
361 | @section Definition of a near miss |
---|
362 | |
---|
363 | Two words are near each other if they can be made identical with one |
---|
364 | of the following changes to one of the words: |
---|
365 | |
---|
366 | @example |
---|
367 | Insert a blank space |
---|
368 | Interchange two adjacent letters. |
---|
369 | Change one letter. |
---|
370 | Delete one letter. |
---|
371 | Add one letter. |
---|
372 | @end example |
---|
373 | |
---|
374 | Someday, perhaps ispell will be extended so that words that sound |
---|
375 | alike would also be considered near misses. If you would like to |
---|
376 | implement this, see Knuth, Volume 3, page 392 for a description of the |
---|
377 | Soundex algorithm which might apply. |
---|
378 | |
---|
379 | @node History, , Near misses, Top |
---|
380 | @section Where it came from |
---|
381 | |
---|
382 | Ispell has a long and convoluted history. Originally called SPELL, it |
---|
383 | was written by Ralph E. Gorin in 1971. That version was written in |
---|
384 | assembly language for the DEC PDP-10 to run under the WAITS operating |
---|
385 | system at the Stanford Artificial Intelligence Laboratory. Subsequent |
---|
386 | versions, also in PDP-10 assembly language, were developed for the BBN |
---|
387 | TENEX, MIT ITS, and DEC TOPS-10 and TOPS-20 operating systems. It was |
---|
388 | later revised by W. E. Matson (1974), and W. B. Ackerman (1978), |
---|
389 | changing its name to ISPELL in the process. |
---|
390 | |
---|
391 | In 1983, Pace Willisson (pace@@ai.mit.edu) converted this version to |
---|
392 | the C language and modified it to work under Unix. |
---|
393 | |
---|
394 | In 1987, Walt Buehring revised and enhanced ispell, and posted it to the |
---|
395 | Usenet along with a dictionary. In addition, Walt wrote the first version |
---|
396 | of "ispell.el", the emacs interface. |
---|
397 | |
---|
398 | Geoff Kuenning (geoff@@ITcorp.com, that's me, and by the way I pronounce |
---|
399 | it "Kenning") picked up this version, fixed many bugs, and added further |
---|
400 | enhancements. In 1988 I got ambitious and rewrote major portions of the |
---|
401 | code, resulting in the table-driven multi-lingual version. Ken Stevens |
---|
402 | (stevens@@hplabs.hp.com) made overwhelming contributions to the elisp |
---|
403 | support to produce the version you are using now. |
---|
404 | |
---|
405 | Due to a misunderstanding involving the Free Software Foundation, it |
---|
406 | later became necessary to rename this version to ispell to avoid |
---|
407 | confusion on the part of users. |
---|
408 | |
---|
409 | Many other enhancements and bug fixes were provided by other people. |
---|
410 | Although I omit mention here due to space, many of these people have |
---|
411 | also made significant contributions to the version of ispell you see |
---|
412 | here. For a full list of people who have contributed to ispell, refer |
---|
413 | to the file @file{Contributors} which is distributed with the ispell |
---|
414 | sources. |
---|
415 | |
---|
416 | @noindent |
---|
417 | Geoff Kuenning @* |
---|
418 | geoff@@ITcorp.com @* |
---|
419 | |
---|
420 | @contents |
---|
421 | |
---|
422 | @bye |
---|