comparison man/fixit.texi @ 90288:7432ca837c8d

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-9 Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 16-33) - Update from CVS - Install ERC. - Fix ERC compiler warnings. - Use utf-8 encoding in ERC ChangeLogs. - Merge ERC-related Viper hacks into Viper. - Merge from erc--main--0 - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 8-13) - Merge from emacs--devo--0 - Update from CVS
author Miles Bader <miles@gnu.org>
date Wed, 01 Feb 2006 10:07:17 +0000
parents 2d92f5c9d6ae 2186cb97b750
children c5406394f567
comparison
equal deleted inserted replaced
90287:3cd97358d81a 90288:7432ca837c8d
18 characters. Consecutive repetitions of the undo command undo earlier 18 characters. Consecutive repetitions of the undo command undo earlier
19 and earlier changes, back to the limit of the undo information 19 and earlier changes, back to the limit of the undo information
20 available. @xref{Undo}, for more information. 20 available. @xref{Undo}, for more information.
21 21
22 @menu 22 @menu
23 * Undo:: The Undo commands.
23 * Kill Errors:: Commands to kill a batch of recently entered text. 24 * Kill Errors:: Commands to kill a batch of recently entered text.
24 * Transpose:: Exchanging two characters, words, lines, lists... 25 * Transpose:: Exchanging two characters, words, lines, lists...
25 * Fixing Case:: Correcting case of last word entered. 26 * Fixing Case:: Correcting case of last word entered.
26 * Spelling:: Apply spelling checker to a word, or a whole file. 27 * Spelling:: Apply spelling checker to a word, or a whole file.
27 @end menu 28 @end menu
29
30 @node Undo
31 @section Undo
32 @cindex undo
33 @cindex changes, undoing
34
35 The @dfn{undo} commands undo recent changes in the buffer's text.
36 Each buffer records changes individually, and the undo command always
37 applies to the current buffer. You can undo all the changes in a
38 buffer for as far as back these records go. Usually each editing
39 command makes a separate entry in the undo records, but some commands
40 such as @code{query-replace} divide their changes into multiple
41 entries for flexibility in undoing. Meanwhile, self-inserting
42 characters are usually grouped to make undoing less tedious.
43
44 @table @kbd
45 @item C-x u
46 @itemx C-_
47 @itemx C-/
48 Undo one entry in the current buffer's undo records (@code{undo}).
49 @end table
50
51 @kindex C-x u
52 @kindex C-_
53 @kindex C-/
54 @findex undo
55 To begin to undo, type the command @kbd{C-x u} (or its aliases,
56 @kbd{C-_} or @kbd{C-/}). This undoes the most recent change in the
57 buffer, and moves point back to where it was before that change.
58
59 Consecutive repetitions of @kbd{C-x u} (or its aliases) undo earlier
60 and earlier changes in the current buffer, back to the limit of the
61 current buffer's undo records. If all the recorded changes have
62 already been undone, the undo command just signals an error.
63
64 If you notice that a buffer has been modified accidentally, the
65 easiest way to recover is to type @kbd{C-_} repeatedly until the stars
66 disappear from the front of the mode line. At this time, all the
67 modifications you made have been canceled. Whenever an undo command
68 makes the stars disappear from the mode line, it means that the buffer
69 contents are the same as they were when the file was last read in or
70 saved.
71
72 If you do not remember whether you changed the buffer deliberately,
73 type @kbd{C-_} once. When you see the last change you made undone, you
74 will see whether it was an intentional change. If it was an accident,
75 leave it undone. If it was deliberate, redo the change as described
76 below.
77
78 @findex undo-only
79 Any command other than an undo command breaks the sequence of undo
80 commands. Starting from that moment, the previous undo commands
81 become ordinary changes that you can undo. Thus, to redo changes you
82 have undone, type @kbd{C-f} or any other command that will harmlessly
83 break the sequence of undoing, then type undo commands again. On the
84 other hand, if you want to resume undoing, without redoing previous
85 undo commands, use @kbd{M-x undo-only}. This is like @code{undo}, but
86 will not redo changes you have just undone.
87
88 @cindex selective undo
89 @kindex C-u C-x u
90 Ordinary undo applies to all changes made in the current buffer. You
91 can also perform @dfn{selective undo}, limited to the region.
92
93 To do this, specify the region you want, then run the @code{undo}
94 command with a prefix argument (the value does not matter): @kbd{C-u
95 C-x u} or @kbd{C-u C-_}. This undoes the most recent change in the
96 region. To undo further changes in the same region, repeat the
97 @code{undo} command (no prefix argument is needed). In Transient Mark
98 mode (@pxref{Transient Mark}), any use of @code{undo} when there is an
99 active region performs selective undo; you do not need a prefix
100 argument.
101
102 Some specialized buffers do not make undo records. Buffers
103 whose names start with spaces never do; these buffers are used
104 internally by Emacs and its extensions to hold text that users don't
105 normally look at or edit.
106
107 @vindex undo-limit
108 @vindex undo-strong-limit
109 @vindex undo-outer-limit
110 @cindex undo limit
111 When the undo records for a buffer becomes too large, Emacs
112 discards the oldest undo records from time to time (during garbage
113 collection). You can specify how much undo records to keep by
114 setting three variables: @code{undo-limit}, @code{undo-strong-limit},
115 and @code{undo-outer-limit}. Their values are expressed in units of
116 bytes of space.
117
118 The variable @code{undo-limit} sets a soft limit: Emacs keeps undo
119 data for enough commands to reach this size, and perhaps exceed it,
120 but does not keep data for any earlier commands beyond that. Its
121 default value is 20000. The variable @code{undo-strong-limit} sets a
122 stricter limit: a previous command (not the most recent one) which
123 pushes the size past this amount is itself forgotten. The default
124 value of @code{undo-strong-limit} is 30000.
125
126 Regardless of the values of those variables, the most recent change
127 is never discarded unless it gets bigger than @code{undo-outer-limit}
128 (normally 3,000,000). At that point, Emacs discards the undo data and
129 warns you about it. This is the only situation in which you cannot
130 undo the last command. If this happens, you can increase the value of
131 @code{undo-outer-limit} to make it even less likely to happen in the
132 future. But if you didn't expect the command to create such large
133 undo data, then it is probably a bug and you should report it.
134 @xref{Bugs,, Reporting Bugs}.
135
136 The reason the @code{undo} command has three key bindings, @kbd{C-x
137 u}, @kbd{C-_} and @kbd{C-/}, is that it is worthy of a
138 single-character key, but @kbd{C-x u} is more straightforward for
139 beginners to remember and type. Meanwhile, @kbd{C--} on a text-only
140 terminal is really @kbd{C-_}, which makes it a natural and easily
141 typed binding for undoing.
28 142
29 @node Kill Errors 143 @node Kill Errors
30 @section Killing Your Mistakes 144 @section Killing Your Mistakes
31 145
32 @table @kbd 146 @table @kbd
39 @end table 153 @end table
40 154
41 The @key{DEL} character (@code{delete-backward-char}) is the most 155 The @key{DEL} character (@code{delete-backward-char}) is the most
42 important correction command. It deletes the character before point. 156 important correction command. It deletes the character before point.
43 When @key{DEL} follows a self-inserting character command, you can think 157 When @key{DEL} follows a self-inserting character command, you can think
44 of it as canceling that command. However, avoid the mistake of thinking 158 of it as canceling that command. However, avoid the confusion of thinking
45 of @key{DEL} as a general way to cancel a command! 159 of @key{DEL} as a general way to cancel a command!
46 160
47 When your mistake is longer than a couple of characters, it might be 161 When your mistake is longer than a couple of characters, it might be
48 more convenient to use @kbd{M-@key{DEL}} or @kbd{C-x @key{DEL}}. 162 more convenient to use @kbd{M-@key{DEL}} or @kbd{C-x @key{DEL}}.
49 @kbd{M-@key{DEL}} kills back to the start of the last word, and @kbd{C-x 163 @kbd{M-@key{DEL}} kills back to the start of the last word, and @kbd{C-x
150 @cindex checking spelling 264 @cindex checking spelling
151 @cindex correcting spelling 265 @cindex correcting spelling
152 266
153 This section describes the commands to check the spelling of a single 267 This section describes the commands to check the spelling of a single
154 word or of a portion of a buffer. These commands work with the spelling 268 word or of a portion of a buffer. These commands work with the spelling
155 checker program Ispell, which is not part of Emacs. 269 checker programs Aspell and Ispell, which are not part of Emacs.
156 @ifinfo 270 @ifinfo
157 @xref{Top, Ispell, Overview ispell, ispell, The Ispell Manual}. 271 @xref{Top, Aspell,, aspell, The Aspell Manual}.
158 @end ifinfo 272 @end ifinfo
159 273
160 @table @kbd 274 @table @kbd
161 @item M-x flyspell-mode 275 @item M-x flyspell-mode
162 Enable Flyspell mode, which highlights all misspelled words. 276 Enable Flyspell mode, which highlights all misspelled words.
176 Check and correct spelling of each word in the region. 290 Check and correct spelling of each word in the region.
177 @item M-x ispell-message 291 @item M-x ispell-message
178 Check and correct spelling of each word in a draft mail message, 292 Check and correct spelling of each word in a draft mail message,
179 excluding cited material. 293 excluding cited material.
180 @item M-x ispell-change-dictionary @key{RET} @var{dict} @key{RET} 294 @item M-x ispell-change-dictionary @key{RET} @var{dict} @key{RET}
181 Restart the Ispell process, using @var{dict} as the dictionary. 295 Restart the Aspell or Ispell process, using @var{dict} as the dictionary.
182 @item M-x ispell-kill-ispell 296 @item M-x ispell-kill-ispell
183 Kill the Ispell subprocess. 297 Kill the Aspell or Ispell subprocess.
184 @end table 298 @end table
185 299
186 @cindex Flyspell mode 300 @cindex Flyspell mode
187 @findex flyspell-mode 301 @findex flyspell-mode
188 Flyspell mode is a fully-automatic way to check spelling as you edit 302 Flyspell mode is a fully-automatic way to check spelling as you edit
259 @item A 373 @item A
260 Accept the incorrect word---treat it as correct, but only in this 374 Accept the incorrect word---treat it as correct, but only in this
261 editing session and for this buffer. 375 editing session and for this buffer.
262 376
263 @item i 377 @item i
264 Insert this word in your private dictionary file so that Ispell will 378 Insert this word in your private dictionary file so that Aspell or Ispell will
265 consider it correct from now on, even in future sessions. 379 consider it correct from now on, even in future sessions.
266 380
267 @item u 381 @item u
268 Insert the lower-case version of this word in your private dic@-tion@-ary 382 Insert the lower-case version of this word in your private dic@-tion@-ary
269 file. 383 file.
326 reload your private dictionary if you edit the file outside of Ispell. 440 reload your private dictionary if you edit the file outside of Ispell.
327 @end ignore 441 @end ignore
328 442
329 @cindex @code{ispell} program 443 @cindex @code{ispell} program
330 @findex ispell-kill-ispell 444 @findex ispell-kill-ispell
331 Once started, the Ispell subprocess continues to run (waiting for 445 Once started, the Aspell or Ispell subprocess continues to run
332 something to do), so that subsequent spell checking commands complete 446 (waiting for something to do), so that subsequent spell checking
333 more quickly. If you want to get rid of the Ispell process, use 447 commands complete more quickly. If you want to get rid of the
334 @kbd{M-x ispell-kill-ispell}. This is not usually necessary, since the 448 process, use @kbd{M-x ispell-kill-ispell}. This is not usually
335 process uses no time except when you do spelling correction. 449 necessary, since the process uses no time except when you do spelling
450 correction.
336 451
337 @vindex ispell-dictionary 452 @vindex ispell-dictionary
338 Ispell uses two dictionaries together for spell checking: the 453 Ispell and Aspell use two dictionaries together for spell checking: the
339 standard dictionary and your private dictionary. The variable 454 standard dictionary and your private dictionary. The variable
340 @code{ispell-dictionary} specifies the file name to use for the 455 @code{ispell-dictionary} specifies the file name to use for the
341 standard dictionary; a value of @code{nil} selects the default 456 standard dictionary; a value of @code{nil} selects the default
342 dictionary. The command @kbd{M-x ispell-change-dictionary} sets this 457 dictionary. The command @kbd{M-x ispell-change-dictionary} sets this
343 variable and then restarts the Ispell subprocess, so that it will use 458 variable and then restarts the subprocess, so that it will use
344 a different standard dictionary. 459 a different standard dictionary.
345 460
346 @vindex ispell-complete-word-dict 461 @vindex ispell-complete-word-dict
347 Ispell uses a separate dictionary for word completion. The variable 462 Aspell and Ispell use a separate dictionary for word completion.
348 @code{ispell-complete-word-dict} specifies the file name of this 463 The variable @code{ispell-complete-word-dict} specifies the file name
349 dictionary. The completion dictionary must be different because it 464 of this dictionary. The completion dictionary must be different
350 cannot use root and affix information. For some languages 465 because it cannot use root and affix information. For some languages
351 there is a spell checking dictionary but no word completion 466 there is a spell checking dictionary but no word completion
352 dictionary. 467 dictionary.
353 468
354 @ignore 469 @ignore
355 arch-tag: 3359a443-96ed-448f-9f05-c8111ba8eac0 470 arch-tag: 3359a443-96ed-448f-9f05-c8111ba8eac0