Mercurial > emacs
comparison man/fixit.texi @ 88155:d7ddb3e565de
sync with trunk
author | Henrik Enberg <henrik.enberg@telia.com> |
---|---|
date | Mon, 16 Jan 2006 00:03:54 +0000 |
parents | 23a1cea22d13 |
children |
comparison
equal
deleted
inserted
replaced
88154:8ce476d3ba36 | 88155:d7ddb3e565de |
---|---|
1 @c This is part of the Emacs manual. | 1 @c This is part of the Emacs manual. |
2 @c Copyright (C) 1985, 86, 87, 93, 94, 95, 1997 Free Software Foundation, Inc. | 2 @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2002, 2003, |
3 @c 2004, 2005 Free Software Foundation, Inc. | |
3 @c See file emacs.texi for copying conditions. | 4 @c See file emacs.texi for copying conditions. |
4 @node Fixit, Files, Search, Top | 5 @node Fixit, Keyboard Macros, Search, Top |
5 @chapter Commands for Fixing Typos | 6 @chapter Commands for Fixing Typos |
6 @cindex typos, fixing | 7 @cindex typos, fixing |
7 @cindex mistakes, correcting | 8 @cindex mistakes, correcting |
8 | 9 |
9 In this chapter we describe the commands that are especially useful for | 10 In this chapter we describe the commands that are especially useful for |
10 the times when you catch a mistake in your text just after you have made | 11 the times when you catch a mistake in your text just after you have made |
11 it, or change your mind while composing text on the fly. | 12 it, or change your mind while composing text on the fly. |
12 | 13 |
13 The most fundamental command for correcting erroneous editing is the | 14 The most fundamental command for correcting erroneous editing is the |
14 undo command, @kbd{C-x u} or @kbd{C-_}. This command undoes a single | 15 undo command, @kbd{C-x u} or @kbd{C-_} or @kbd{C-/}. This command |
15 command (usually), a part of a command (in the case of | 16 undoes a single command (usually), a part of a command (in the case of |
16 @code{query-replace}), or several consecutive self-inserting characters. | 17 @code{query-replace}), or several consecutive self-inserting |
17 Consecutive repetitions of @kbd{C-_} or @kbd{C-x u} undo earlier and | 18 characters. Consecutive repetitions of the undo command undo earlier |
18 earlier changes, back to the limit of the undo information available. | 19 and earlier changes, back to the limit of the undo information |
19 @xref{Undo}, for more information. | 20 available. @xref{Undo}, for more information. |
20 | 21 |
21 @menu | 22 @menu |
22 * Kill Errors:: Commands to kill a batch of recently entered text. | 23 * Kill Errors:: Commands to kill a batch of recently entered text. |
23 * Transpose:: Exchanging two characters, words, lines, lists... | 24 * Transpose:: Exchanging two characters, words, lines, lists... |
24 * Fixing Case:: Correcting case of last word entered. | 25 * Fixing Case:: Correcting case of last word entered. |
151 | 152 |
152 This section describes the commands to check the spelling of a single | 153 This section describes the commands to check the spelling of a single |
153 word or of a portion of a buffer. These commands work with the spelling | 154 word or of a portion of a buffer. These commands work with the spelling |
154 checker program Ispell, which is not part of Emacs. | 155 checker program Ispell, which is not part of Emacs. |
155 @ifinfo | 156 @ifinfo |
156 @xref{Top, Ispell, Overview ispell, ispell.info, The Ispell Manual}. | 157 @xref{Top, Ispell, Overview ispell, ispell, The Ispell Manual}. |
157 @end ifinfo | 158 @end ifinfo |
158 | 159 |
159 @table @kbd | 160 @table @kbd |
160 @item M-x flyspell-mode | 161 @item M-x flyspell-mode |
161 Enable Flyspell mode, which highlights all misspelled words. | 162 Enable Flyspell mode, which highlights all misspelled words. |
162 @item M-x flyspell-progmode | 163 @item M-x flyspell-prog-mode |
163 Enable Flyspell mode for comments and strings only. | 164 Enable Flyspell mode for comments and strings only. |
164 @item M-$ | 165 @item M-$ |
165 Check and correct spelling of the word at point (@code{ispell-word}). | 166 Check and correct spelling of the word at point (@code{ispell-word}). |
166 @item M-@key{TAB} | 167 @item M-@key{TAB} |
168 @itemx @key{ESC} @key{TAB} | |
167 Complete the word before point based on the spelling dictionary | 169 Complete the word before point based on the spelling dictionary |
168 (@code{ispell-complete-word}). | 170 (@code{ispell-complete-word}). |
169 @item M-x ispell | 171 @item M-x ispell |
170 Spell-check the active region or the current buffer. | 172 Spell-check the active region or the current buffer. |
171 @item M-x ispell-buffer | 173 @item M-x ispell-buffer |
200 it only checks words in comments and string constants. This feature | 202 it only checks words in comments and string constants. This feature |
201 is useful for editing programs. Type @kbd{M-x flyspell-prog-mode} to | 203 is useful for editing programs. Type @kbd{M-x flyspell-prog-mode} to |
202 enable or disable this mode in the current buffer. | 204 enable or disable this mode in the current buffer. |
203 | 205 |
204 The other Emacs spell-checking features check or look up words when | 206 The other Emacs spell-checking features check or look up words when |
205 you give an explicit command to do so. Checking all or part of the | 207 you give an explicit command to do so. |
206 buffer is useful when you have text that was written outside of this | |
207 Emacs session and might contain any number of misspellings. | |
208 | 208 |
209 @kindex M-$ | 209 @kindex M-$ |
210 @findex ispell-word | 210 @findex ispell-word |
211 To check the spelling of the word around or next to point, and | 211 To check the spelling of the word around or before point, and |
212 optionally correct it as well, use the command @kbd{M-$} | 212 optionally correct it as well, use the command @kbd{M-$} |
213 (@code{ispell-word}). If the word is not correct, the command offers | 213 (@code{ispell-word}). If the word is not correct, the command offers |
214 you various alternatives for what to do about it. | 214 you various alternatives for what to do about it. |
215 | 215 |
216 @findex ispell-buffer | 216 @findex ispell-buffer |
237 @item @key{SPC} | 237 @item @key{SPC} |
238 Skip this word---continue to consider it incorrect, but don't change it | 238 Skip this word---continue to consider it incorrect, but don't change it |
239 here. | 239 here. |
240 | 240 |
241 @item r @var{new} @key{RET} | 241 @item r @var{new} @key{RET} |
242 Replace the word (just this time) with @var{new}. | 242 Replace the word (just this time) with @var{new}. (The replacement |
243 string will be rescanned for more spelling errors.) | |
243 | 244 |
244 @item R @var{new} @key{RET} | 245 @item R @var{new} @key{RET} |
245 Replace the word with @var{new}, and do a @code{query-replace} so you | 246 Replace the word with @var{new}, and do a @code{query-replace} so you |
246 can replace it elsewhere in the buffer if you wish. | 247 can replace it elsewhere in the buffer if you wish. (The replacements |
248 will be rescanned for more spelling errors.) | |
247 | 249 |
248 @item @var{digit} | 250 @item @var{digit} |
249 Replace the word (just this time) with one of the displayed | 251 Replace the word (just this time) with one of the displayed |
250 near-misses. Each near-miss is listed with a digit; type that digit to | 252 near-misses. Each near-miss is listed with a digit; type that digit to |
251 select it. | 253 select it. |
275 become the new list of ``near-misses''; you can select one of them as | 277 become the new list of ``near-misses''; you can select one of them as |
276 the replacement by typing a digit. You can use @samp{*} in @var{word} as a | 278 the replacement by typing a digit. You can use @samp{*} in @var{word} as a |
277 wildcard. | 279 wildcard. |
278 | 280 |
279 @item C-g | 281 @item C-g |
280 Quit interactive spell checking. You can restart it again afterward | 282 Quit interactive spell checking, leaving point at the word that was |
281 with @kbd{C-u M-$}. | 283 being checked. You can restart checking again afterward with @kbd{C-u |
284 M-$}. | |
282 | 285 |
283 @item X | 286 @item X |
284 Same as @kbd{C-g}. | 287 Same as @kbd{C-g}. |
285 | 288 |
286 @item x | 289 @item x |
294 Refresh the screen. | 297 Refresh the screen. |
295 | 298 |
296 @item C-z | 299 @item C-z |
297 This key has its normal command meaning (suspend Emacs or iconify this | 300 This key has its normal command meaning (suspend Emacs or iconify this |
298 frame). | 301 frame). |
302 | |
303 @item ? | |
304 Show the list of options. | |
299 @end table | 305 @end table |
300 | 306 |
301 @findex ispell-complete-word | 307 @findex ispell-complete-word |
302 The command @code{ispell-complete-word}, which is bound to the key | 308 The command @code{ispell-complete-word}, which is bound to the key |
303 @kbd{M-@key{TAB}} in Text mode and related modes, shows a list of | 309 @kbd{M-@key{TAB}} in Text mode and related modes, shows a list of |
304 completions based on spelling correction. Insert the beginning of a | 310 completions based on spelling correction. Insert the beginning of a |
305 word, and then type @kbd{M-@key{TAB}}; the command displays a completion | 311 word, and then type @kbd{M-@key{TAB}}; the command displays a |
306 list window. To choose one of the completions listed, click | 312 completion list window. (If your window manager intercepts |
307 @kbd{Mouse-2} on it, or move the cursor there in the completions window | 313 @kbd{M-@key{TAB}}, type @kbd{@key{ESC} @key{TAB}} or @kbd{C-M-i}.) To |
308 and type @key{RET}. @xref{Text Mode}. | 314 choose one of the completions listed, click @kbd{Mouse-2} or |
315 @kbd{Mouse-1} fast on it, or move the cursor there in the completions | |
316 window and type @key{RET}. @xref{Text Mode}. | |
309 | 317 |
310 @ignore | 318 @ignore |
311 @findex reload-ispell | 319 @findex reload-ispell |
312 The first time you use any of the spell checking commands, it starts | 320 The first time you use any of the spell checking commands, it starts |
313 an Ispell subprocess. The first thing the subprocess does is read your | 321 an Ispell subprocess. The first thing the subprocess does is read your |
337 | 345 |
338 @vindex ispell-complete-word-dict | 346 @vindex ispell-complete-word-dict |
339 Ispell uses a separate dictionary for word completion. The variable | 347 Ispell uses a separate dictionary for word completion. The variable |
340 @code{ispell-complete-word-dict} specifies the file name of this | 348 @code{ispell-complete-word-dict} specifies the file name of this |
341 dictionary. The completion dictionary must be different because it | 349 dictionary. The completion dictionary must be different because it |
342 cannot use employ root and affix information. For some languages | 350 cannot use root and affix information. For some languages |
343 there is a spell checking dictionary but no word completion | 351 there is a spell checking dictionary but no word completion |
344 dictionary. | 352 dictionary. |
353 | |
354 @ignore | |
355 arch-tag: 3359a443-96ed-448f-9f05-c8111ba8eac0 | |
356 @end ignore |