diff options
| author | Richard M. Stallman | 2006-01-29 16:51:26 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-01-29 16:51:26 +0000 |
| commit | b96ade76c429f5ccedc6cbed9078b50dae21fdf7 (patch) | |
| tree | 0e1da4776191228db384a1b231d3cf517a1e99e2 /man/basic.texi | |
| parent | 597993cf4433604ea65e40d33ad6cfe83dab2fb7 (diff) | |
| download | emacs-b96ade76c429f5ccedc6cbed9078b50dae21fdf7.tar.gz emacs-b96ade76c429f5ccedc6cbed9078b50dae21fdf7.zip | |
Minor cleanups.
(Undo): selective-undo moved.
Diffstat (limited to 'man/basic.texi')
| -rw-r--r-- | man/basic.texi | 80 |
1 files changed, 35 insertions, 45 deletions
diff --git a/man/basic.texi b/man/basic.texi index 85de3b5b669..5676a562867 100644 --- a/man/basic.texi +++ b/man/basic.texi | |||
| @@ -154,9 +154,9 @@ rebind @key{DEL} to other commands. | |||
| 154 | clicking the left mouse button where you want to move to. | 154 | clicking the left mouse button where you want to move to. |
| 155 | 155 | ||
| 156 | There are also control and meta characters for cursor motion. Some | 156 | There are also control and meta characters for cursor motion. Some |
| 157 | are equivalent to the arrow keys (these date back to the days before | 157 | are equivalent to the arrow keys (it is faster to use these control |
| 158 | terminals had arrow keys, and are usable on terminals which don't have | 158 | keys than move your hand over to the arrow keys). Others do more |
| 159 | them). Others do more sophisticated things. | 159 | sophisticated things. |
| 160 | 160 | ||
| 161 | @kindex C-a | 161 | @kindex C-a |
| 162 | @kindex C-e | 162 | @kindex C-e |
| @@ -282,8 +282,8 @@ Delete the character after point (@code{delete-char}). | |||
| 282 | @item @key{DELETE} | 282 | @item @key{DELETE} |
| 283 | @itemx @key{BACKSPACE} | 283 | @itemx @key{BACKSPACE} |
| 284 | One of these keys, whichever is the large key above the @key{RET} or | 284 | One of these keys, whichever is the large key above the @key{RET} or |
| 285 | @key{ENTER} key, deletes the character before point, like @key{DEL}. | 285 | @key{ENTER} key, deletes the character before point---it is @key{DEL}. |
| 286 | If that is @key{BACKSPACE}, and your keyboard also has @key{DELETE}, | 286 | If @key{BACKSPACE} is @key{DEL}, and your keyboard also has @key{DELETE}, |
| 287 | then @key{DELETE} deletes forwards, like @kbd{C-d}. | 287 | then @key{DELETE} deletes forwards, like @kbd{C-d}. |
| 288 | @item C-k | 288 | @item C-k |
| 289 | Kill to the end of the line (@code{kill-line}). | 289 | Kill to the end of the line (@code{kill-line}). |
| @@ -330,8 +330,6 @@ Undo one batch of changes---usually, one command worth (@code{undo}). | |||
| 330 | @item C-_ | 330 | @item C-_ |
| 331 | @itemx C-/ | 331 | @itemx C-/ |
| 332 | The same. | 332 | The same. |
| 333 | @item C-u C-x u | ||
| 334 | Undo one batch of changes in the region. | ||
| 335 | @end table | 333 | @end table |
| 336 | 334 | ||
| 337 | @kindex C-x u | 335 | @kindex C-x u |
| @@ -358,20 +356,6 @@ hand, if you want to ignore previous undo commands, use @kbd{M-x | |||
| 358 | undo-only}. This is like @code{undo}, but will not redo changes | 356 | undo-only}. This is like @code{undo}, but will not redo changes |
| 359 | you have just undone. | 357 | you have just undone. |
| 360 | 358 | ||
| 361 | @cindex selective undo | ||
| 362 | @kindex C-u C-x u | ||
| 363 | Ordinary undo applies to all changes made in the current buffer. You | ||
| 364 | can also perform @dfn{selective undo}, limited to the current region | ||
| 365 | (@pxref{Mark}). | ||
| 366 | To do this, specify the region you want, then run the @code{undo} | ||
| 367 | command with a prefix argument (the value does not matter): @kbd{C-u C-x | ||
| 368 | u} or @kbd{C-u C-_}. This undoes the most recent change in the region. | ||
| 369 | To undo further changes in the same region, repeat the @code{undo} | ||
| 370 | command (no prefix argument is needed). In Transient Mark mode | ||
| 371 | (@pxref{Transient Mark}), any use of @code{undo} when there is an | ||
| 372 | active region performs selective undo; you do not need a prefix | ||
| 373 | argument. | ||
| 374 | |||
| 375 | If you notice that a buffer has been modified accidentally, the | 359 | If you notice that a buffer has been modified accidentally, the |
| 376 | easiest way to recover is to type @kbd{C-_} repeatedly until the stars | 360 | easiest way to recover is to type @kbd{C-_} repeatedly until the stars |
| 377 | disappear from the front of the mode line. At this time, all the | 361 | disappear from the front of the mode line. At this time, all the |
| @@ -386,15 +370,20 @@ will see whether it was an intentional change. If it was an accident, | |||
| 386 | leave it undone. If it was deliberate, redo the change as described | 370 | leave it undone. If it was deliberate, redo the change as described |
| 387 | above. | 371 | above. |
| 388 | 372 | ||
| 389 | Not all buffers record undo information. Buffers whose names start with | 373 | Normal undo applies to the buffer as a whole. You can also |
| 390 | spaces don't; these buffers are used internally by Emacs and its extensions | 374 | selectively undo changes in any part of the buffer (@pxref{Selective |
| 391 | to hold text that users don't normally look at or edit. | 375 | Undo}). |
| 376 | |||
| 377 | Some specialized buffers do not record undo information. Buffers | ||
| 378 | whose names start with spaces never do; these buffers are used | ||
| 379 | internally by Emacs and its extensions to hold text that users don't | ||
| 380 | normally look at or edit. | ||
| 392 | 381 | ||
| 393 | You cannot undo mere cursor motion; only changes in the buffer | 382 | The undo command applies only to changes in the buffer; you can't |
| 394 | contents save undo information. However, some cursor motion commands | 383 | use it to undo mere cursor motion. However, some cursor motion |
| 395 | set the mark, so if you use these commands from time to time, you can | 384 | commands set the mark, so if you use these commands from time to time, |
| 396 | move back to the neighborhoods you have moved through by popping the | 385 | you can move back to the neighborhoods you have moved through by |
| 397 | mark ring (@pxref{Mark Ring}). | 386 | popping the mark ring (@pxref{Mark Ring}). |
| 398 | 387 | ||
| 399 | @vindex undo-limit | 388 | @vindex undo-limit |
| 400 | @vindex undo-strong-limit | 389 | @vindex undo-strong-limit |
| @@ -428,24 +417,26 @@ undo data, then it is probably a bug and you should report it. | |||
| 428 | The reason the @code{undo} command has three key bindings, @kbd{C-x | 417 | The reason the @code{undo} command has three key bindings, @kbd{C-x |
| 429 | u}, @kbd{C-_} and @kbd{C-/}, is that it is worthy of a | 418 | u}, @kbd{C-_} and @kbd{C-/}, is that it is worthy of a |
| 430 | single-character key, but @kbd{C-x u} is more straightforward for | 419 | single-character key, but @kbd{C-x u} is more straightforward for |
| 431 | beginners to type. | 420 | beginners to type. Meanwhile, @kbd{C--} on a text-only terminal is |
| 421 | really @kbd{C-_}, which makes it a natural and easily typed binding | ||
| 422 | for undoing. | ||
| 432 | 423 | ||
| 433 | @node Basic Files | 424 | @node Basic Files |
| 434 | @section Files | 425 | @section Files |
| 435 | 426 | ||
| 436 | The commands described above are sufficient for creating and altering | 427 | The commands described above are sufficient for creating and altering |
| 437 | text in an Emacs buffer; the more advanced Emacs commands just make | 428 | text in an Emacs buffer; the more advanced Emacs commands just make |
| 438 | things easier. But to keep any text permanently you must put it in a | 429 | things easier. However, to keep any text permanently you must put it in a |
| 439 | @dfn{file}. Files are named units of text which are stored by the | 430 | @dfn{file}. Files are named units of text which are stored by the |
| 440 | operating system for you to retrieve later by name. To look at or use | 431 | operating system for you to retrieve later by name. To look at or use |
| 441 | the contents of a file in any way, including editing the file with | 432 | the contents of a file in any way, including editing the file with |
| 442 | Emacs, you must specify the file name. | 433 | Emacs, you must specify the file name. |
| 443 | 434 | ||
| 444 | Consider a file named @file{/usr/rms/foo.c}. In Emacs, to begin editing | 435 | Consider a file named @file{test.emacs}. (We can assume it is in |
| 445 | this file, type | 436 | your home directory.) In Emacs, to begin editing this file, type |
| 446 | 437 | ||
| 447 | @example | 438 | @example |
| 448 | C-x C-f /usr/rms/foo.c @key{RET} | 439 | C-x C-f test.emacs @key{RET} |
| 449 | @end example | 440 | @end example |
| 450 | 441 | ||
| 451 | @noindent | 442 | @noindent |
| @@ -459,8 +450,8 @@ copying the contents of the file into the buffer, and then displaying | |||
| 459 | the buffer for you to edit. If you alter the text, you can @dfn{save} | 450 | the buffer for you to edit. If you alter the text, you can @dfn{save} |
| 460 | the new text in the file by typing @kbd{C-x C-s} (@code{save-buffer}). | 451 | the new text in the file by typing @kbd{C-x C-s} (@code{save-buffer}). |
| 461 | This makes the changes permanent by copying the altered buffer contents | 452 | This makes the changes permanent by copying the altered buffer contents |
| 462 | back into the file @file{/usr/rms/foo.c}. Until you save, the changes | 453 | back into the file @file{test.emacs}. Until you save, the changes |
| 463 | exist only inside Emacs, and the file @file{foo.c} is unaltered. | 454 | exist only inside Emacs, and the file @file{test.emacs} is unaltered. |
| 464 | 455 | ||
| 465 | To create a file, just visit the file with @kbd{C-x C-f} as if it | 456 | To create a file, just visit the file with @kbd{C-x C-f} as if it |
| 466 | already existed. This creates an empty buffer in which you can insert | 457 | already existed. This creates an empty buffer in which you can insert |
| @@ -777,15 +768,14 @@ holding down modifier keys; @kbd{C-u} works on all terminals. To type a | |||
| 777 | negative argument, type a minus sign after @kbd{C-u}. Just a minus sign | 768 | negative argument, type a minus sign after @kbd{C-u}. Just a minus sign |
| 778 | without digits normally means @minus{}1. | 769 | without digits normally means @minus{}1. |
| 779 | 770 | ||
| 780 | @kbd{C-u} followed by a character which is neither a digit nor a minus | 771 | @kbd{C-u} without digits or minus sign has the special meaning of |
| 781 | sign has the special meaning of ``multiply by four.'' It multiplies the | 772 | ``four times'': it multiplies the argument for the next command by |
| 782 | argument for the next command by four. @kbd{C-u} twice multiplies it by | 773 | four. @kbd{C-u C-u} multiplies it by sixteen. Thus, @kbd{C-u C-u |
| 783 | sixteen. Thus, @kbd{C-u C-u C-f} moves forward sixteen characters. This | 774 | C-f} moves forward sixteen characters. This is a good way to move |
| 784 | is a good way to move forward ``fast,'' since it moves about 1/5 of a line | 775 | forward ``fast,'' since it moves about 1/5 of a line in the usual size |
| 785 | in the usual size screen. Other useful combinations are @kbd{C-u C-n}, | 776 | screen. Other useful combinations are @kbd{C-u C-n}, @kbd{C-u C-u |
| 786 | @kbd{C-u C-u C-n} (move down a good fraction of a screen), @kbd{C-u C-u | 777 | C-n} (move down a good fraction of a screen), @kbd{C-u C-u C-o} (make |
| 787 | C-o} (make ``a lot'' of blank lines), and @kbd{C-u C-k} (kill four | 778 | ``a lot'' of blank lines), and @kbd{C-u C-k} (kill four lines).@refill |
| 788 | lines).@refill | ||
| 789 | 779 | ||
| 790 | Some commands care only about whether there is an argument, and not about | 780 | Some commands care only about whether there is an argument, and not about |
| 791 | its value. For example, the command @kbd{M-q} (@code{fill-paragraph}) with | 781 | its value. For example, the command @kbd{M-q} (@code{fill-paragraph}) with |