aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-01-31 18:19:57 +0000
committerRichard M. Stallman2006-01-31 18:19:57 +0000
commit362b8f6b29f43857cbd6a6a36d32915e08dec25f (patch)
tree2fd874349a8113a73eebf6f23fbe11bad2184ca4
parent63c5dbcf82f4d9487ef212c2c9cb460c54d147c4 (diff)
downloademacs-362b8f6b29f43857cbd6a6a36d32915e08dec25f.tar.gz
emacs-362b8f6b29f43857cbd6a6a36d32915e08dec25f.zip
(Undo): New node, mostly copied from basic.texi.
Selective undo text merged in. (Spelling): Mention Aspell along with Ispell.
-rw-r--r--man/fixit.texi149
1 files changed, 132 insertions, 17 deletions
diff --git a/man/fixit.texi b/man/fixit.texi
index f58d3c835a6..d552c66f733 100644
--- a/man/fixit.texi
+++ b/man/fixit.texi
@@ -20,12 +20,126 @@ and earlier changes, back to the limit of the undo information
20available. @xref{Undo}, for more information. 20available. @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
28 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.
36Each buffer records changes individually, and the undo command always
37applies to the current buffer. You can undo all the changes in a
38buffer for as far as back these records go. Usually each editing
39command makes a separate entry in the undo records, but some commands
40such as @code{query-replace} divide their changes into multiple
41entries for flexibility in undoing. Meanwhile, self-inserting
42characters are usually grouped to make undoing less tedious.
43
44@table @kbd
45@item C-x u
46@itemx C-_
47@itemx C-/
48Undo 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
57buffer, 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
60and earlier changes in the current buffer, back to the limit of the
61current buffer's undo records. If all the recorded changes have
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
78@findex undo-only
79 Any command other than an undo command breaks the sequence of undo
80commands. Starting from that moment, the previous undo commands
81become ordinary changes that you can undo. Thus, to redo changes you
82have undone, type @kbd{C-f} or any other command that will harmlessly
83break the sequence of undoing, then type undo commands again. On the
84other hand, if you want to resume undoing, without redoing previous
85undo commands, use @kbd{M-x undo-only}. This is like @code{undo}, but
86will 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
91can also perform @dfn{selective undo}, limited to the region.
92
93 To do this, specify the region you want, then run the @code{undo}
94command with a prefix argument (the value does not matter): @kbd{C-u
95C-x u} or @kbd{C-u C-_}. This undoes the most recent change in the
96region. To undo further changes in the same region, repeat the
97@code{undo} command (no prefix argument is needed). In Transient Mark
98mode (@pxref{Transient Mark}), any use of @code{undo} when there is an
99active region performs selective undo; you do not need a prefix
100argument.
101
102 Some specialized buffers do not make undo records. Buffers
103whose names start with spaces never do; these buffers are used
104internally by Emacs and its extensions to hold text that users don't
105normally 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
112discards the oldest undo records from time to time (during garbage
113collection). You can specify how much undo records to keep by
114setting three variables: @code{undo-limit}, @code{undo-strong-limit},
115and @code{undo-outer-limit}. Their values are expressed in units of
116bytes of space.
117
118 The variable @code{undo-limit} sets a soft limit: Emacs keeps undo
119data for enough commands to reach this size, and perhaps exceed it,
120but does not keep data for any earlier commands beyond that. Its
121default value is 20000. The variable @code{undo-strong-limit} sets a
122stricter limit: a previous command (not the most recent one) which
123pushes the size past this amount is itself forgotten. The default
124value of @code{undo-strong-limit} is 30000.
125
126 Regardless of the values of those variables, the most recent change
127is 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
129warns you about it. This is the only situation in which you cannot
130undo 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
132future. But if you didn't expect the command to create such large
133undo 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
137u}, @kbd{C-_} and @kbd{C-/}, is that it is worthy of a
138single-character key, but @kbd{C-x u} is more straightforward for
139beginners to remember and type. Meanwhile, @kbd{C--} on a text-only
140terminal is really @kbd{C-_}, which makes it a natural and easily
141typed binding for undoing.
142
29@node Kill Errors 143@node Kill Errors
30@section Killing Your Mistakes 144@section Killing Your Mistakes
31 145
@@ -41,7 +155,7 @@ Kill to beginning of sentence (@code{backward-kill-sentence}).
41 The @key{DEL} character (@code{delete-backward-char}) is the most 155 The @key{DEL} character (@code{delete-backward-char}) is the most
42important correction command. It deletes the character before point. 156important correction command. It deletes the character before point.
43When @key{DEL} follows a self-inserting character command, you can think 157When @key{DEL} follows a self-inserting character command, you can think
44of it as canceling that command. However, avoid the mistake of thinking 158of it as canceling that command. However, avoid the confusion of thinking
45of @key{DEL} as a general way to cancel a command! 159of @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
@@ -152,9 +266,9 @@ case-convert it and go on typing. @xref{Case}.@refill
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
154word or of a portion of a buffer. These commands work with the spelling 268word or of a portion of a buffer. These commands work with the spelling
155checker program Ispell, which is not part of Emacs. 269checker 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
@@ -178,9 +292,9 @@ Check and correct spelling of each word in the region.
178Check and correct spelling of each word in a draft mail message, 292Check and correct spelling of each word in a draft mail message,
179excluding cited material. 293excluding 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}
181Restart the Ispell process, using @var{dict} as the dictionary. 295Restart 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
183Kill the Ispell subprocess. 297Kill the Aspell or Ispell subprocess.
184@end table 298@end table
185 299
186@cindex Flyspell mode 300@cindex Flyspell mode
@@ -261,7 +375,7 @@ Accept the incorrect word---treat it as correct, but only in this
261editing session and for this buffer. 375editing session and for this buffer.
262 376
263@item i 377@item i
264Insert this word in your private dictionary file so that Ispell will 378Insert this word in your private dictionary file so that Aspell or Ispell will
265consider it correct from now on, even in future sessions. 379consider it correct from now on, even in future sessions.
266 380
267@item u 381@item u
@@ -328,26 +442,27 @@ reload your private dictionary if you edit the file outside of Ispell.
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
332something to do), so that subsequent spell checking commands complete 446(waiting for something to do), so that subsequent spell checking
333more quickly. If you want to get rid of the Ispell process, use 447commands 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 448process, use @kbd{M-x ispell-kill-ispell}. This is not usually
335process uses no time except when you do spelling correction. 449necessary, since the process uses no time except when you do spelling
450correction.
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
339standard dictionary and your private dictionary. The variable 454standard 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
341standard dictionary; a value of @code{nil} selects the default 456standard dictionary; a value of @code{nil} selects the default
342dictionary. The command @kbd{M-x ispell-change-dictionary} sets this 457dictionary. The command @kbd{M-x ispell-change-dictionary} sets this
343variable and then restarts the Ispell subprocess, so that it will use 458variable and then restarts the subprocess, so that it will use
344a different standard dictionary. 459a 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 463The variable @code{ispell-complete-word-dict} specifies the file name
349dictionary. The completion dictionary must be different because it 464of this dictionary. The completion dictionary must be different
350cannot use root and affix information. For some languages 465because it cannot use root and affix information. For some languages
351there is a spell checking dictionary but no word completion 466there is a spell checking dictionary but no word completion
352dictionary. 467dictionary.
353 468