aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2008-09-22 18:16:42 +0000
committerChong Yidong2008-09-22 18:16:42 +0000
commitbc129797ca107769279b1a44c9e183b8b6caa646 (patch)
tree26e09a94ff1535eaafdbca8a4b195426cb125b7e
parent841c809617baac9f7889443c6c6b3ca02a6ccf5a (diff)
downloademacs-bc129797ca107769279b1a44c9e183b8b6caa646.tar.gz
emacs-bc129797ca107769279b1a44c9e183b8b6caa646.zip
(Fixit): Favor C-/ keybinding for undo throughout. Link to Erasing
node. (Undo): Reorganize paragraphs for logical flow. Move keybinding rationale to a footnote. (Kill Errors): Remove node, due to redundancy with Erasing. (Spelling): Move discussion of flyspell to end. Note new behavior of M-$ in active region. Remove non-ispell-specific keybindings from table.
-rw-r--r--doc/emacs/fixit.texi371
1 files changed, 154 insertions, 217 deletions
diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi
index a6bd52b1bc4..114ba9247dd 100644
--- a/doc/emacs/fixit.texi
+++ b/doc/emacs/fixit.texi
@@ -7,21 +7,24 @@
7@cindex typos, fixing 7@cindex typos, fixing
8@cindex mistakes, correcting 8@cindex mistakes, correcting
9 9
10 In this chapter we describe the commands that are especially useful for 10 In this chapter we describe the commands that are especially useful
11the times when you catch a mistake in your text just after you have made 11when you catch a mistake in your text after you have made it, or
12it, or change your mind while composing text on the fly. 12change your mind while composing text on the fly.
13 13
14 The most fundamental command for correcting erroneous editing is the 14 The most fundamental command for correcting erroneous editing is the
15undo command, @kbd{C-x u} or @kbd{C-_} or @kbd{C-/}. This command 15undo command @kbd{C-/} (which is also bound to @kbd{C-x u} and
16undoes a single command (usually), a part of a command (in the case of 16@kbd{C-_}). This undoes a single command, or a part of a command (as
17@code{query-replace}), or several consecutive self-inserting 17in the case of @code{query-replace}), or several consecutive
18characters. Consecutive repetitions of the undo command undo earlier 18self-inserting characters. Consecutive repetitions of @kbd{C-/} undo
19and earlier changes, back to the limit of the undo information 19earlier and earlier changes, back to the limit of the undo information
20available. @xref{Undo}, for more information. 20available.
21
22 Aside from the commands described here, you can erase text using
23deletion commands such as @key{DEL} (@code{delete-backward-char}).
24These were described earlier in this manual. @xref{Erasing}.
21 25
22@menu 26@menu
23* Undo:: The Undo commands. 27* Undo:: The Undo commands.
24* Kill Errors:: Commands to kill a batch of recently entered text.
25* Transpose:: Exchanging two characters, words, lines, lists... 28* Transpose:: Exchanging two characters, words, lines, lists...
26* Fixing Case:: Correcting case of last word entered. 29* Fixing Case:: Correcting case of last word entered.
27* Spelling:: Apply spelling checker to a word, or a whole file. 30* Spelling:: Apply spelling checker to a word, or a whole file.
@@ -32,19 +35,20 @@ available. @xref{Undo}, for more information.
32@cindex undo 35@cindex undo
33@cindex changes, undoing 36@cindex changes, undoing
34 37
35 The @dfn{undo} commands undo recent changes in the buffer's text. 38 The @dfn{undo} command reverses recent changes in the buffer's text.
36Each buffer records changes individually, and the undo command always 39Each buffer records changes individually, and the undo command always
37applies to the current buffer. You can undo all the changes in a 40applies to the current buffer. You can undo all the changes in a
38buffer for as far as back these records go. Usually each editing 41buffer for as far as back its records go. Usually, each editing
39command makes a separate entry in the undo records, but some commands 42command makes a separate entry in the undo records, but some commands
40such as @code{query-replace} divide their changes into multiple 43such as @code{query-replace} divide their changes into multiple
41entries for flexibility in undoing. Meanwhile, self-inserting 44entries for flexibility in undoing. Consecutive character insertion
42characters are usually grouped to make undoing less tedious. 45commands are usually grouped together into a single undo record, to
46make undoing less tedious.
43 47
44@table @kbd 48@table @kbd
45@item C-x u 49@item C-/
50@itemx C-x u
46@itemx C-_ 51@itemx C-_
47@itemx C-/
48Undo one entry in the current buffer's undo records (@code{undo}). 52Undo one entry in the current buffer's undo records (@code{undo}).
49@end table 53@end table
50 54
@@ -52,74 +56,75 @@ Undo one entry in the current buffer's undo records (@code{undo}).
52@kindex C-_ 56@kindex C-_
53@kindex C-/ 57@kindex C-/
54@findex undo 58@findex undo
55 To begin to undo, type the command @kbd{C-/} (or its aliases, 59 To begin to undo, type @kbd{C-/} (or its aliases, @kbd{C-_} or
56@kbd{C-_} or @kbd{C-x u}). This undoes the most recent change in the 60@kbd{C-x u})@footnote{Aside from @kbd{C-/}, the @code{undo} command is
57buffer, and moves point back to where it was before that change. 61also bound to @kbd{C-x u} because that is more straightforward for
62beginners to remember: @samp{u} stands for ``undo''. It is also bound
63to @kbd{C-_} because typing @kbd{C-/} on some text-only terminals
64actually enters @kbd{C-_}.}. This undoes the most recent change in
65the buffer, and moves point back to where it was before that change.
58 66
59 Consecutive repetitions of @kbd{C-/} (or its aliases) undo earlier 67 Consecutive repetitions of @kbd{C-/} (or its aliases) undo earlier
60and earlier changes in the current buffer, back to the limit of the 68and earlier changes in the current buffer. If all the recorded
61current buffer's undo records. If all the recorded changes have 69changes have already been undone, the undo command signals an error.
62already been undone, the undo command just signals an error.
63
64 If you notice that a buffer has been modified accidentally, the
65easiest way to recover is to type @kbd{C-/} repeatedly until the stars
66disappear from the front of the mode line. At this time, all the
67modifications you made have been canceled. Whenever an undo command
68makes the stars disappear from the mode line, it means that the buffer
69contents are the same as they were when the file was last read in or
70saved.
71
72 If you do not remember whether you changed the buffer deliberately,
73type @kbd{C-/} once. When you see the last change you made undone, you
74will see whether it was an intentional change. If it was an accident,
75leave it undone. If it was deliberate, redo the change as described
76below.
77 70
71@cindex redo
78@findex undo-only 72@findex undo-only
79 Any command other than an undo command breaks the sequence of undo 73 Any command other than an undo command breaks the sequence of undo
80commands. Starting from that moment, the previous undo commands 74commands. Starting from that moment, the entire sequence of undo
81become ordinary changes that you can undo. Thus, to redo changes you 75commands that you have just performed are themselves placed into the
82have undone, type @kbd{C-f} or any other command that will harmlessly 76undo record, as a single set of changes. Therefore, to re-apply
83break the sequence of undoing, then type undo commands again. On the 77changes you have undone, type @kbd{C-f} or any other command that
84other hand, if you want to resume undoing, without redoing previous 78harmlessly breaks the sequence of undoing; then type @kbd{C-/} to undo
85undo commands, use @kbd{M-x undo-only}. This is like @code{undo}, but 79the undo command.
86will not redo changes you have just undone. 80
81 On the other hand, if you want to resume undoing, without redoing
82previous undo commands, use @kbd{M-x undo-only}. This is like
83@code{undo}, but will not redo changes you have just undone.
84
85 If you notice that a buffer has been modified accidentally, the
86easiest way to recover is to type @kbd{C-/} repeatedly until the stars
87disappear from the front of the mode line (@pxref{Mode Line}).
88Whenever an undo command makes the stars disappear from the mode line,
89it means that the buffer contents are the same as they were when the
90file was last read in or saved. If you do not remember whether you
91changed the buffer deliberately, type @kbd{C-/} once. When you see
92the last change you made undone, you will see whether it was an
93intentional change. If it was an accident, leave it undone. If it
94was deliberate, redo the change as described above.
87 95
88@cindex selective undo 96@cindex selective undo
89@kindex C-u C-/ 97@kindex C-u C-/
90 When there is an active region, any use of @code{undo} performs 98 When there is an active region, any use of @code{undo} performs
91@dfn{selective undo}, undoing the most recent change within the 99@dfn{selective undo}: it undoes the most recent change within the
92region, instead of the entire buffer. However, when Transient Mark 100region, instead of the entire buffer. However, when Transient Mark
93mode is off (@pxref{Persistent Mark}), @kbd{C-/} always operates on 101mode is off (@pxref{Persistent Mark}), @kbd{C-/} always operates on
94the entire buffer, ignoring the region. In this case, you can perform 102the entire buffer, ignoring the region. In this case, you can perform
95selective undo by supplying a prefix argument to the @code{undo} 103selective undo by supplying a prefix argument to the @code{undo}
96command: @kbd{C-u C-/} or @kbd{C-u C-x u}. To undo further changes in 104command: @kbd{C-u C-/}. To undo further changes in the same region,
97the same region, repeat the @code{undo} command (no prefix argument is 105repeat the @code{undo} command (no prefix argument is needed).
98needed).
99 106
100 Some specialized buffers do not make undo records. Buffers 107 Some specialized buffers do not make undo records. Buffers whose
101whose names start with spaces never do; these buffers are used 108names start with spaces never do; these buffers are used internally by
102internally by Emacs and its extensions to hold text that users don't 109Emacs to hold text that users don't normally look at or edit.
103normally look at or edit.
104 110
105@vindex undo-limit 111@vindex undo-limit
106@vindex undo-strong-limit 112@vindex undo-strong-limit
107@vindex undo-outer-limit 113@vindex undo-outer-limit
108@cindex undo limit 114@cindex undo limit
109 When the undo records for a buffer becomes too large, Emacs 115 When the undo records for a buffer becomes too large, Emacs discards
110discards the oldest undo records from time to time (during garbage 116the oldest undo records from time to time (during @dfn{garbage
111collection). You can specify how much undo records to keep by 117collection}). You can specify how much undo records to keep by
112setting three variables: @code{undo-limit}, @code{undo-strong-limit}, 118setting the variables @code{undo-limit}, @code{undo-strong-limit}, and
113and @code{undo-outer-limit}. Their values are expressed in units of 119@code{undo-outer-limit}. Their values are expressed in bytes.
114bytes of space.
115 120
116 The variable @code{undo-limit} sets a soft limit: Emacs keeps undo 121 The variable @code{undo-limit} sets a soft limit: Emacs keeps undo
117data for enough commands to reach this size, and perhaps exceed it, 122data for enough commands to reach this size, and perhaps exceed it,
118but does not keep data for any earlier commands beyond that. Its 123but does not keep data for any earlier commands beyond that. Its
119default value is 20000. The variable @code{undo-strong-limit} sets a 124default value is 20000. The variable @code{undo-strong-limit} sets a
120stricter limit: a previous command (not the most recent one) which 125stricter limit: any previous command (though not the most recent one)
121pushes the size past this amount is itself forgotten. The default 126that pushes the size past this amount is forgotten. The default value
122value of @code{undo-strong-limit} is 30000. 127of @code{undo-strong-limit} is 30000.
123 128
124 Regardless of the values of those variables, the most recent change 129 Regardless of the values of those variables, the most recent change
125is never discarded unless it gets bigger than @code{undo-outer-limit} 130is never discarded unless it gets bigger than @code{undo-outer-limit}
@@ -131,46 +136,6 @@ future. But if you didn't expect the command to create such large
131undo data, then it is probably a bug and you should report it. 136undo data, then it is probably a bug and you should report it.
132@xref{Bugs,, Reporting Bugs}. 137@xref{Bugs,, Reporting Bugs}.
133 138
134 The reason the @code{undo} command has three key bindings, @kbd{C-x
135u}, @kbd{C-_} and @kbd{C-/}, is that it is worthy of a
136single-character key, but @kbd{C-x u} is more straightforward for
137beginners to remember and type. Meanwhile, @kbd{C--} on a text-only
138terminal is really @kbd{C-_}, which makes it a natural and easily
139typed binding for undoing.
140
141@node Kill Errors
142@section Killing Your Mistakes
143
144@table @kbd
145@item @key{DEL}
146Delete last character (@code{delete-backward-char}).
147@item M-@key{DEL}
148Kill last word (@code{backward-kill-word}).
149@item C-x @key{DEL}
150Kill to beginning of sentence (@code{backward-kill-sentence}).
151@end table
152
153 The @key{DEL} character (@code{delete-backward-char}) is the most
154important correction command. It deletes the character before point.
155When @key{DEL} follows a self-inserting character command, you can think
156of it as canceling that command. However, avoid the confusion of thinking
157of @key{DEL} as a general way to cancel a command!
158
159 When your mistake is longer than a couple of characters, it might be
160more convenient to use @kbd{M-@key{DEL}} or @kbd{C-x @key{DEL}}.
161@kbd{M-@key{DEL}} kills back to the start of the last word, and @kbd{C-x
162@key{DEL}} kills back to the start of the last sentence. @kbd{C-x
163@key{DEL}} is particularly useful when you change your mind about the
164phrasing of the text you are writing. @kbd{M-@key{DEL}} and @kbd{C-x
165@key{DEL}} save the killed text for @kbd{C-y} and @kbd{M-y} to
166retrieve. @xref{Yanking}.@refill
167
168 @kbd{M-@key{DEL}} is often useful even when you have typed only a few
169characters wrong, if you know you are confused in your typing and aren't
170sure exactly what you typed. At such a time, you cannot correct with
171@key{DEL} except by looking at the screen to see what you did. Often it
172requires less thought to kill the whole word and start again.
173
174@node Transpose 139@node Transpose
175@section Transposing Text 140@section Transposing Text
176 141
@@ -262,103 +227,82 @@ case-convert it and go on typing. @xref{Case}.@refill
262@cindex checking spelling 227@cindex checking spelling
263@cindex correcting spelling 228@cindex correcting spelling
264 229
265 This section describes the commands to check the spelling of a single 230 This section describes the commands to check the spelling of a
266word or of a portion of a buffer. These commands work with the spelling 231single word or of a portion of a buffer. These commands only work if
267checker programs Aspell and Ispell, which are not part of Emacs. 232the spelling checker program Aspell or Ispell is installed. Neither
233Aspell nor Ispell are part of Emacs, but one or the other is usually
234installed in GNU/Linux and other free operating systems.
268@ifnottex 235@ifnottex
269@xref{Top, Aspell,, aspell, The Aspell Manual}. 236@xref{Top, Aspell,, aspell, The Aspell Manual}.
270@end ifnottex 237@end ifnottex
271 238
272@table @kbd 239@table @kbd
273@item M-x flyspell-mode
274Enable Flyspell mode, which highlights all misspelled words.
275@item M-x flyspell-prog-mode
276Enable Flyspell mode for comments and strings only.
277@item M-$ 240@item M-$
278Check and correct spelling of the word at point (@code{ispell-word}). 241Check and correct spelling of the active region or the word at point
279@item M-@key{TAB} 242(@code{ispell-word}).
280@itemx @key{ESC} @key{TAB}
281Complete the word before point based on the spelling dictionary
282(@code{ispell-complete-word}).
283@item M-x ispell 243@item M-x ispell
284Spell-check the active region or the current buffer. 244Check and correct spelling in the active region or the entire buffer.
285@item M-x ispell-buffer 245@item M-x ispell-buffer
286Check and correct spelling of each word in the buffer. 246Check and correct spelling in the buffer.
287@item M-x ispell-region 247@item M-x ispell-region
288Check and correct spelling of each word in the region. 248Check and correct spelling in the region.
289@item M-x ispell-message 249@item M-x ispell-message
290Check and correct spelling of each word in a draft mail message, 250Check and correct spelling in a draft mail message, excluding cited
291excluding cited material. 251material.
292@item M-x ispell-change-dictionary @key{RET} @var{dict} @key{RET} 252@item M-x ispell-change-dictionary @key{RET} @var{dict} @key{RET}
293Restart the Aspell or Ispell process, using @var{dict} as the dictionary. 253Restart the Aspell or Ispell process, using @var{dict} as the dictionary.
294@item M-x ispell-kill-ispell 254@item M-x ispell-kill-ispell
295Kill the Aspell or Ispell subprocess. 255Kill the Aspell or Ispell subprocess.
256@item M-@key{TAB}
257@itemx @key{ESC} @key{TAB}
258Complete the word before point based on the spelling dictionary
259(@code{ispell-complete-word}).
260@item M-x flyspell-mode
261Enable Flyspell mode, which highlights all misspelled words.
262@item M-x flyspell-prog-mode
263Enable Flyspell mode for comments and strings only.
296@end table 264@end table
297 265
298@cindex Flyspell mode
299@findex flyspell-mode
300 Flyspell mode is a fully-automatic way to check spelling as you edit
301in Emacs. It operates by checking words as you change or insert them.
302When it finds a word that it does not recognize, it highlights that
303word. This does not interfere with your editing, but when you see the
304highlighted word, you can move to it and fix it. Type @kbd{M-x
305flyspell-mode} to enable or disable this mode in the current buffer.
306
307 When Flyspell mode highlights a word as misspelled, you can click on
308it with @kbd{Mouse-2} to display a menu of possible corrections and
309actions. You can also correct the word by editing it manually in any
310way you like.
311
312@findex flyspell-prog-mode
313Flyspell Prog mode works just like ordinary Flyspell mode, except that
314it only checks words in comments and string constants. This feature
315is useful for editing programs. Type @kbd{M-x flyspell-prog-mode} to
316enable or disable this mode in the current buffer.
317
318 The other Emacs spell-checking features check or look up words when
319you give an explicit command to do so.
320
321@kindex M-$ 266@kindex M-$
322@findex ispell-word 267@findex ispell-word
323 To check the spelling of the word around or before point, and 268 To check the spelling of the word around or before point, and
324optionally correct it as well, use the command @kbd{M-$} 269optionally correct it as well, type @kbd{M-$} (@code{ispell-word}).
325(@code{ispell-word}). If the word is not correct, Emacs offers you 270If a region is active, @kbd{M-$} checks the spelling of all words
326various alternatives for what to do about it. If a region is active, 271within the region. @xref{Mark}. (When Transient Mark mode is off,
327@kbd{M-$} checks the spelling of all words within the region 272@kbd{M-$} always acts on the word around or before point, ignoring the
328(@pxref{Mark}). (However, when Transient Mark mode is off, @kbd{M-$} 273region. @xref{Persistent Mark}.)
329always acts on the word around or before point, ignoring the region.
330@xref{Persistent Mark}.)
331 274
332@findex ispell 275@findex ispell
333@cindex spell-checking the active region
334 The @kbd{M-x ispell} command performs spell-checking on the entire
335buffer if no region is active, or on region if one is active. (When
336Transient Mark mode is off, it always acts on the entire buffer,
337ignoring the region.)
338
339@findex ispell-buffer 276@findex ispell-buffer
340@findex ispell-region 277@findex ispell-region
341 The commands @kbd{M-x ispell-buffer} and @kbd{M-x ispell-region} 278@cindex spell-checking the active region
279 Similarly, the command @kbd{M-x ispell} performs spell-checking in
280the region if one is active, or in the entire buffer otherwise. The
281commands @kbd{M-x ispell-buffer} and @kbd{M-x ispell-region}
342explicitly perform spell-checking on the entire buffer or the region 282explicitly perform spell-checking on the entire buffer or the region
343respectively. 283respectively. To check spelling in an email message you are writing,
284use @kbd{M-x ispell-message}; that command checks the whole buffer,
285except for material that is indented or appears to be cited from other
286messages. @xref{Sending Mail}.
344 287
345 To check spelling in an email message you are writing, use @kbd{M-x 288 When one of these commands encounters what appears to be an
346ispell-message}; that command checks the whole buffer, except for 289incorrect word, it asks you what to do. It usually displays a list of
347material that is indented or appears to be cited from other messages. 290numbered ``near-misses''---words that are close to the incorrect word.
348 291Then you must type a single-character response. Here are the valid
349 Each time these commands encounter an incorrect word, they ask you 292responses:
350what to do. They display a list of alternatives, usually including
351several ``near-misses''---words that are close to the word being
352checked. Then you must type a single-character response. Here are
353the valid responses:
354 293
355@table @kbd 294@table @kbd
295@item @var{digit}
296Replace the word, just this time, with one of the displayed
297near-misses. Each near-miss is listed with a digit; type that digit
298to select it.
299
356@item @key{SPC} 300@item @key{SPC}
357Skip this word---continue to consider it incorrect, but don't change it 301Skip this word---continue to consider it incorrect, but don't change it
358here. 302here.
359 303
360@item r @var{new} @key{RET} 304@item r @var{new} @key{RET}
361Replace the word (just this time) with @var{new}. (The replacement 305Replace the word, just this time, with @var{new}. (The replacement
362string will be rescanned for more spelling errors.) 306string will be rescanned for more spelling errors.)
363 307
364@item R @var{new} @key{RET} 308@item R @var{new} @key{RET}
@@ -366,11 +310,6 @@ Replace the word with @var{new}, and do a @code{query-replace} so you
366can replace it elsewhere in the buffer if you wish. (The replacements 310can replace it elsewhere in the buffer if you wish. (The replacements
367will be rescanned for more spelling errors.) 311will be rescanned for more spelling errors.)
368 312
369@item @var{digit}
370Replace the word (just this time) with one of the displayed
371near-misses. Each near-miss is listed with a digit; type that digit to
372select it.
373
374@item a 313@item a
375Accept the incorrect word---treat it as correct, but only in this 314Accept the incorrect word---treat it as correct, but only in this
376editing session. 315editing session.
@@ -383,14 +322,14 @@ editing session and for this buffer.
383Insert this word in your private dictionary file so that Aspell or Ispell will 322Insert this word in your private dictionary file so that Aspell or Ispell will
384consider it correct from now on, even in future sessions. 323consider it correct from now on, even in future sessions.
385 324
386@item u
387Insert the lower-case version of this word in your private dic@-tion@-ary
388file.
389
390@item m 325@item m
391Like @kbd{i}, but you can also specify dictionary completion 326Like @kbd{i}, but you can also specify dictionary completion
392information. 327information.
393 328
329@item u
330Insert the lower-case version of this word in your private dic@-tion@-ary
331file.
332
394@item l @var{word} @key{RET} 333@item l @var{word} @key{RET}
395Look in the dictionary for words that match @var{word}. These words 334Look in the dictionary for words that match @var{word}. These words
396become the new list of ``near-misses''; you can select one of them as 335become the new list of ``near-misses''; you can select one of them as
@@ -398,13 +337,11 @@ the replacement by typing a digit. You can use @samp{*} in @var{word} as a
398wildcard. 337wildcard.
399 338
400@item C-g 339@item C-g
340@itemx X
401Quit interactive spell checking, leaving point at the word that was 341Quit interactive spell checking, leaving point at the word that was
402being checked. You can restart checking again afterward with @kbd{C-u 342being checked. You can restart checking again afterward with @kbd{C-u
403M-$}. 343M-$}.
404 344
405@item X
406Same as @kbd{C-g}.
407
408@item x 345@item x
409Quit interactive spell checking and move point back to where it was 346Quit interactive spell checking and move point back to where it was
410when you started spell checking. 347when you started spell checking.
@@ -412,65 +349,65 @@ when you started spell checking.
412@item q 349@item q
413Quit interactive spell checking and kill the Ispell subprocess. 350Quit interactive spell checking and kill the Ispell subprocess.
414 351
415@item C-l
416Refresh the screen.
417
418@item C-z
419This key has its normal command meaning (suspend Emacs or iconify this
420frame).
421
422@item ? 352@item ?
423Show the list of options. 353Show the list of options.
424@end table 354@end table
425 355
426@findex ispell-complete-word 356@findex ispell-complete-word
427 The command @code{ispell-complete-word}, which is bound to the key 357 In Text mode and related modes, the command @kbd{M-@key{TAB}}
428@kbd{M-@key{TAB}} in Text mode and related modes, shows a list of 358(@code{ispell-complete-word}) shows a list of completions based on
429completions based on spelling correction. Insert the beginning of a 359spelling correction. Insert the beginning of a word, and then type
430word, and then type @kbd{M-@key{TAB}}; the command displays a 360@kbd{M-@key{TAB}}; the command displays a completion list window. (If
431completion list window. (If your window manager intercepts 361your window manager intercepts @kbd{M-@key{TAB}}, type @kbd{@key{ESC}
432@kbd{M-@key{TAB}}, type @kbd{@key{ESC} @key{TAB}} or @kbd{C-M-i}.) To 362@key{TAB}} or @kbd{C-M-i}.) To choose one of the completions listed,
433choose one of the completions listed, click @kbd{Mouse-2} or 363click @kbd{Mouse-2} or @kbd{Mouse-1} fast on it, or move the cursor
434@kbd{Mouse-1} fast on it, or move the cursor there in the completions 364there in the completions window and type @key{RET}. @xref{Text Mode}.
435window and type @key{RET}. @xref{Text Mode}.
436
437@ignore
438@findex reload-ispell
439 The first time you use any of the spell checking commands, it starts
440an Ispell subprocess. The first thing the subprocess does is read your
441private dictionary, which defaults to the file @file{~/ispell.words}.
442Words that you ``insert'' with the @kbd{i} command are added to that
443file, but not right away---only at the end of the interactive
444replacement procedure. Use the @kbd{M-x reload-ispell} command to
445reload your private dictionary if you edit the file outside of Ispell.
446@end ignore
447 365
448@cindex @code{ispell} program 366@cindex @code{ispell} program
449@findex ispell-kill-ispell 367@findex ispell-kill-ispell
450 Once started, the Aspell or Ispell subprocess continues to run 368 Once started, the Aspell or Ispell subprocess continues to run,
451(waiting for something to do), so that subsequent spell checking 369waiting for something to do, so that subsequent spell checking
452commands complete more quickly. If you want to get rid of the 370commands complete more quickly. If you want to get rid of the
453process, use @kbd{M-x ispell-kill-ispell}. This is not usually 371process, use @kbd{M-x ispell-kill-ispell}. This is not usually
454necessary, since the process uses no time except when you do spelling 372necessary, since the process uses no time except when you do spelling
455correction. 373correction.
456 374
457@vindex ispell-dictionary 375@vindex ispell-dictionary
458 Ispell and Aspell use two dictionaries together for spell checking: the 376@vindex ispell-complete-word-dict
459standard dictionary and your private dictionary. The variable 377 Ispell and Aspell use two dictionaries together for spell checking:
378the standard dictionary and your private dictionary. The variable
460@code{ispell-dictionary} specifies the file name to use for the 379@code{ispell-dictionary} specifies the file name to use for the
461standard dictionary; a value of @code{nil} selects the default 380standard dictionary; a value of @code{nil} selects the default
462dictionary. The command @kbd{M-x ispell-change-dictionary} sets this 381dictionary. The command @kbd{M-x ispell-change-dictionary} sets this
463variable and then restarts the subprocess, so that it will use 382variable and then restarts the subprocess, so that it will use a
464a different standard dictionary. 383different standard dictionary. A separate dictionary is used for word
465 384completion. The variable @code{ispell-complete-word-dict} specifies
466@vindex ispell-complete-word-dict 385the file name of this dictionary. The completion dictionary must be
467 Aspell and Ispell use a separate dictionary for word completion. 386different because it cannot use root and affix information. For some
468The variable @code{ispell-complete-word-dict} specifies the file name 387languages, there is a spell checking dictionary but no word completion
469of this dictionary. The completion dictionary must be different
470because it cannot use root and affix information. For some languages
471there is a spell checking dictionary but no word completion
472dictionary. 388dictionary.
473 389
390@cindex Flyspell mode
391@findex flyspell-mode
392 Flyspell mode is a fully-automatic way to check spelling as you edit
393in Emacs. It operates by checking words as you change or insert them.
394When it finds a word that it does not recognize, it highlights that
395word. This does not interfere with your editing, but when you see the
396highlighted word, you can move to it and fix it. Type @kbd{M-x
397flyspell-mode} to enable or disable this mode in the current buffer.
398
399 When Flyspell mode highlights a word as misspelled, you can click on
400it with @kbd{Mouse-2} to display a menu of possible corrections and
401actions. You can also correct the word by editing it manually in any
402way you like.
403
404@findex flyspell-prog-mode
405 Flyspell Prog mode works just like ordinary Flyspell mode, except
406that it only checks words in comments and string constants. This
407feature is useful for editing programs. Type @kbd{M-x
408flyspell-prog-mode} to enable or disable this mode in the current
409buffer.
410
474@ignore 411@ignore
475 arch-tag: 3359a443-96ed-448f-9f05-c8111ba8eac0 412 arch-tag: 3359a443-96ed-448f-9f05-c8111ba8eac0
476@end ignore 413@end ignore