annotate man/xemacs/undo.texi @ 4857:34ff4dd7397d

Add ChangeLog entries for previous changes to tests dir -------------------- ChangeLog entries follow: -------------------- tests/ChangeLog addition: 2010-01-14 Ben Wing <ben@xemacs.org> * automated/base64-tests.el (bt-base64-encode-string): * automated/base64-tests.el (bt-base64-decode-string): * automated/base64-tests.el (for): * automated/byte-compiler-tests.el: * automated/byte-compiler-tests.el (before-and-after-compile-equal): * automated/case-tests.el: * automated/case-tests.el (downcase-string): * automated/case-tests.el (insert): * automated/case-tests.el (featurep): * automated/case-tests.el (let): * automated/case-tests.el (boundp): * automated/ccl-tests.el (ccl-test-normal-expr): * automated/ccl-tests.el (ccl-test-map-instructions): * automated/ccl-tests.el (ccl-test-suites): * automated/database-tests.el (delete-database-files): * automated/extent-tests.el (let): * automated/extent-tests.el (insert): * automated/extent-tests.el (props): * automated/hash-table-tests.el (test): * automated/hash-table-tests.el (for): * automated/hash-table-tests.el (ht): * automated/hash-table-tests.el (iterations): * automated/hash-table-tests.el (h1): * automated/hash-table-tests.el (make-hash-table): * automated/hash-table-tests.el (sxhash): * automated/lisp-tests.el: * automated/lisp-tests.el (setq): * automated/lisp-tests.el (test-setq): * automated/lisp-tests.el (my-vector): * automated/lisp-tests.el (nconc): * automated/lisp-tests.el (x): * automated/lisp-tests.el (y): * automated/lisp-tests.el (butlast): * automated/lisp-tests.el (+): * automated/lisp-tests.el (featurep): * automated/lisp-tests.el (-): * automated/lisp-tests.el (six): * automated/lisp-tests.el (three): * automated/lisp-tests.el (1): * automated/lisp-tests.el (one): * automated/lisp-tests.el (two): * automated/lisp-tests.el (0): * automated/lisp-tests.el (five): * automated/lisp-tests.el (logxor): * automated/lisp-tests.el (test1): * automated/lisp-tests.el (division-test): * automated/lisp-tests.el (for): * automated/lisp-tests.el (check-function-argcounts): * automated/lisp-tests.el (type-of): * automated/lisp-tests.el (mapcar): * automated/lisp-tests.el (z): * automated/lisp-tests.el (mapvector): * automated/lisp-tests.el (mapconcat): * automated/lisp-tests.el ([1 2 3]): * automated/lisp-tests.el (#*010): * automated/lisp-tests.el (test-harness-risk-infloops): * automated/lisp-tests.el (erase-buffer): * automated/lisp-tests.el (sym): * automated/lisp-tests.el (subseq): * automated/lisp-tests.el (length): * automated/lisp-tests.el (102): * automated/lisp-tests.el (read): * automated/lisp-tests.el (new-char): * automated/lisp-tests.el (new-load-file-name): * automated/lisp-tests.el (cl-floor): * automated/lisp-tests.el (foo): * automated/lisp-tests.el (string-variable): * automated/md5-tests.el (lambda): * automated/md5-tests.el (large-string): * automated/md5-tests.el (mapcar): * automated/md5-tests.el (insert): * automated/mule-tests.el (test-chars): * automated/mule-tests.el (existing-file-name): * automated/mule-tests.el (featurep): * automated/query-coding-tests.el (featurep): * automated/regexp-tests.el: * automated/regexp-tests.el (insert): * automated/regexp-tests.el (Assert): * automated/regexp-tests.el (string-match): * automated/regexp-tests.el (featurep): * automated/regexp-tests.el (text): * automated/regexp-tests.el (text1): * automated/regexp-tests.el ("aáa"): * automated/symbol-tests.el: * automated/symbol-tests.el (name): * automated/symbol-tests.el (check-weak-list-unique): * automated/symbol-tests.el (string): * automated/symbol-tests.el (list): * automated/symbol-tests.el (foo): * automated/symbol-tests.el (read): * automated/symbol-tests.el (eval): * automated/symbol-tests.el (fresh-keyword-name): * automated/symbol-tests.el (set): * automated/symbol-tests.el (print-gensym): * automated/symbol-tests.el (mysym): * automated/syntax-tests.el (test-forward-word): * automated/syntax-tests.el (test-backward-word): * automated/syntax-tests.el (test-syntax-table): * automated/syntax-tests.el (with-syntax-table): * automated/syntax-tests.el (Skip-Test-Unless): * automated/syntax-tests.el (with): * automated/tag-tests.el (testfile): * automated/test-harness.el: * automated/test-harness.el (test-harness-from-buffer): * automated/weak-tests.el (w): * automated/weak-tests.el (p): * automated/weak-tests.el (a): Create Assert-eq, Assert-equal, etc. These are equivalent to (Assert (eq ...)) etc. but display both the actual value and the expected value of the comparison. Use them throughout the test suite. * automated/test-harness.el (Assert): Clean up code and doc string of macro Assert.
author Ben Wing <ben@xemacs.org>
date Thu, 14 Jan 2010 02:34:47 -0600
parents 376386a54a3c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 @node Undo, Minibuffer, Basic, Top
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 @chapter Undoing Changes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 @cindex undo
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 @cindex mistakes, correcting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 Emacs allows you to undo all changes you make to the text of a buffer,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 up to a certain amount of change (8000 characters). Each buffer records
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 changes individually, and the undo command always applies to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 current buffer. Usually each editing command makes a separate entry
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 in the undo records, but some commands such as @code{query-replace}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 make many entries, and very simple commands such as self-inserting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 characters are often grouped to make undoing less tedious.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 @table @kbd
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 @item C-x u
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 Undo one batch of changes (usually, one command's worth) (@code{undo}).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 @item C-_
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 The same.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 @end table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 @kindex C-x u
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 @kindex C-_
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 @findex undo
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 The command @kbd{C-x u} or @kbd{C-_} allows you to undo changes. The
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 first time you give this command, it undoes the last change. Point
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 moves to the text affected by the undo, so you can see what was undone.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 Consecutive repetitions of the @kbd{C-_} or @kbd{C-x u} commands undo
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 earlier and earlier changes, back to the limit of what has been
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 recorded. If all recorded changes have already been undone, the undo
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 command prints an error message and does nothing.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 Any command other than an undo command breaks the sequence of undo
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 commands. Starting at this moment, the previous undo commands are
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 considered ordinary changes that can themselves be undone. Thus, you can
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 redo changes you have undone by typing @kbd{C-f} or any other command
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 that have no important effect, and then using more undo commands.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 If you notice that a buffer has been modified accidentally, the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 easiest way to recover is to type @kbd{C-_} repeatedly until the stars
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 disappear from the front of the mode line. When that happens, all the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 modifications you made have been canceled. If you do not remember
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 whether you changed the buffer deliberately, type @kbd{C-_} once. When
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 you see Emacs undo the last change you made, you probably remember why you
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 made it. If the change was an accident, leave it undone. If it was
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 deliberate, redo the change as described in the preceding paragraph.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 Whenever an undo command makes the stars disappear from the mode line,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 the buffer contents is the same as it was when the file was last read in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 or saved.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 Not all buffers record undo information. Buffers whose names start with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 spaces don't; these buffers are used internally by Emacs and its extensions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 to hold text that users don't normally look at or edit. Minibuffers,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 help buffers, and documentation buffers also don't record undo information.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 Emacs can remember at most 8000 or so characters of deleted or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 modified text in any one buffer for reinsertion by the undo command.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 There is also a limit on the number of individual insert, delete, or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 change actions that Emacs can remember.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 There are two keys to run the @code{undo} command, @kbd{C-x u} and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 @kbd{C-_}, because on some keyboards, it is not obvious how to type
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 @kbd{C-_}. @kbd{C-x u} is an alternative you can type in the same
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 fashion on any terminal.