1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265
|
@c =============================================================
@c = $B85(B $BK](B $BLu(B: $B9b<.0l5*!wEE5$DL?.Bg3X(B
@c = $B2CI.=$@5(B: $BBgLZFXM:!wBgDM(B.$BC^GHBg3X(B = 1998/11/25
@c = 20.4$B2~D{(B: $BBgLZFXM:!wBgDM(B.$BC^GHBg3X(B = 1999/09/12
@c =============================================================
@c This is part of the Emacs manual.
@c Copyright (C) 1985, 86, 87, 93, 94, 95, 1997 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Basic, Minibuffer, Exiting, Top
@c @chapter Basic Editing Commands
@chapter $B4pK\JT=8%3%^%s%I(B
@kindex C-h t
@findex help-with-tutorial
@c We now give the basics of how to enter text, make corrections, and
@c save the text in a file. If this material is new to you, you might
@c learn it more easily by running the Emacs learn-by-doing tutorial. To
@c use the tutorial, run Emacs and type @kbd{Control-h t}
@c (@code{help-with-tutorial}).
$B%F%-%9%H$NF~NO!"=$@5!"%U%!%$%k$X$NJ]B8$H$$$C$?4pK\A`:n$K$D$$$F@bL@$7$^$9!#(B
$B$3$l$i$K@\$9$k$N$,=i$a$F$H$$$&FI<T$O!"(B
$B<j$rF0$+$7$J$,$i3X$V%A%e!<%H%j%"%k$r<B9T$7$?$[$&$,!"(B
$B$b$C$H4JC1$K=,F@$G$-$k;W$$$^$9!#(B
$B%A%e!<%H%j%"%k$rMxMQ$9$k$K$O!"(B
Emacs$B$r5/F0$7$F(B@kbd{Control-h t}$B$HBG$A$^$9!#(B
@footnote{$B!ZLuCm![(BEmacs$B$N%$%s%9%H!<%k$N;EJ}$K$h$C$F$O!"(B
$B$-$A$s$HF|K\8l$N%A%e!<%H%j%"%k$,I=<($5$l$k!#(B
$B$=$&$G$J$1$l$P!"(B
@kbd{M-x set-language-environment @key{RET} Japanese @key{RET}}$B!J$"$k$$$O!"(B
@kbd{C-x @key{RET} l Japanese @key{RET}}$B!K$HBG$C$F$+$i!"(B
$B2~$a$F(B@kbd{Control-h t}$B$HBG$D!#(B
$BF|K\8l0J30$K$b$$$/$D$+$N8@8l$N%A%e!<%H%j%"%k$,$"$k!#(B}
@c To clear the screen and redisplay, type @kbd{C-l} (@code{recenter}).
$B2hLL$r%/%j%"$7$F:FI=<($9$k$K$O!"(B@kbd{C-l}$B!J(B@code{recenter}$B!K$HBG$A$^$9!#(B
@menu
* Inserting Text:: Inserting text by simply typing it.
* Moving Point:: How to move the cursor to the place where you want to
change something.
* Erasing:: Deleting and killing text.
* Undo:: Undoing recent changes in the text.
* Files: Basic Files. Visiting, creating, and saving files.
* Help: Basic Help. Asking what a character does.
* Blank Lines:: Commands to make or delete blank lines.
* Continuation Lines:: Lines too wide for the screen.
* Position Info:: What page, line, row, or column is point on?
* Arguments:: Numeric arguments for repeating a command.
* Repeating:: A short-cut for repeating the previous command.
@end menu
@node Inserting Text
@c @section Inserting Text
@section $B%F%-%9%H$rA^F~$9$k(B
@c @cindex insertion
@c @cindex graphic characters
@cindex $BA^F~(B
@cindex $B?^7AJ8;z(B
@c To insert printing characters into the text you are editing, just type
@c them. This inserts the characters you type into the buffer at the
@c cursor (that is, at @dfn{point}; @pxref{Point}). The cursor moves
@c forward, and any text after the cursor moves forward too. If the text
@c in the buffer is @samp{FOOBAR}, with the cursor before the @samp{B},
@c then if you type @kbd{XX}, you get @samp{FOOXXBAR}, with the cursor
@c still before the @samp{B}.
$BJT=8Cf$N%F%-%9%H$K0u;zJ8;z$rA^F~$9$k$K$O!"(B
$BC1$K$=$NJ8;z$rBG$A$^$9!#(B
$B$3$&$9$k$H!"BG80$7$?J8;z$,%P%C%U%!$N%+!<%=%k0LCV(B
$B!J$9$J$o$A(B@dfn{$B%]%$%s%H(B}$B0LCV!#(B@pxref{Point}$B!K$KA^F~$5$l$^$9!#(B
$B%+!<%=%k$O1&!JA08~$-!K$K0\F0$7$F!"(B
$B$=$l$K$"$o$;$F%+!<%=%k0J9_$N$9$Y$F$N%F%-%9%H$b1&!JA08~$-!K$K0\F0$7$^$9!#(B
$B%P%C%U%!Fb$N%F%-%9%H$,(B@samp{FOOBAR}$B$G$"$C$F!"(B
$B%+!<%=%k$,(B@samp{B}$B$K=E$J$C$F$$$k$H$9$k$H!"(B
@kbd{XX}$B$HBG$D$H%+!<%=%k$O(B@samp{B}$B$K=E$J$C$?$^$^$G!"(B
@samp{FOOXXBAR}$B$H$J$j$^$9!#(B
@c To @dfn{delete} text you have just inserted, use @key{DEL}. @key{DEL}
@c deletes the character @emph{before} the cursor (not the one that the cursor
@c is on top of or under; that is the character @var{after} the cursor). The
@c cursor and all characters after it move backwards. Therefore, if you type
@c a printing character and then type @key{DEL}, they cancel out.
$BA^F~$7$?$P$+$j$N%F%-%9%H$r(B@dfn{$B:o=|(B}$B!J(Bdelete$B!K$9$k$K$O!"(B
@key{DEL}$B%-!<$r;H$$$^$9!#(B
@key{DEL}$B%-!<$O(B@emph{$B%+!<%=%k$N$^$((B}$B$NJ8;z$r:o=|$7$^$9(B
$B!J%+!<%=%k$,=E$J$C$F$$$kJ8;z$G$O$J$$!#(B
$B$=$NJ8;z$O%+!<%=%k$N(B@var{$B$&$7$m(B}$B$K$"$k!K!#(B
$B%+!<%=%k$H%+!<%=%k0J9_$N$9$Y$F$N%F%-%9%H$O:8!J8e8~$-!K$K0\F0$7$^$9!#(B
$B$D$^$j!"?^7AJ8;z$r(B1$B$DBG$C$?D>8e$K(B@key{DEL}$B$rBG$D$H!"(B
$BA^F~$r<h$j>C$7$?$3$H$K$J$j$^$9!#(B
@kindex RET
@c @cindex newline
@cindex $B2~9T(B
@c To end a line and start typing a new one, type @key{RET}. This
@c inserts a newline character in the buffer. If point is in the middle of
@c a line, @key{RET} splits the line. Typing @key{DEL} when the cursor is
@c at the beginning of a line deletes the preceding newline, thus joining
@c the line with the preceding line.
$B9T$r=*$($F?7$?$J9T$rBG$A;O$a$k$K$O!"(B@key{RET}$B$rBG$A$^$9!#(B
$B$3$l$K$h$j!"%P%C%U%!$K2~9TJ8;z$,A^F~$5$l$^$9!#(B
$B%]%$%s%H$,9T$NESCf$K$"$k>l9g!"(B@key{RET}$B$O9T$rJ,3d$7$^$9!#(B
$B%+!<%=%k$,9TF,$K$"$k$H$-$K(B@key{DEL}$B$rBG$D$H!"(B
$BD>A0$N2~9TJ8;z$,:o=|$5$l$FD>A0$N9T$HO"7k$5$l$^$9!#(B
@c Emacs can split lines automatically when they become too long, if you
@c turn on a special minor mode called @dfn{Auto Fill} mode.
@c @xref{Filling}, for how to use Auto Fill mode.
@dfn{$B<+F05M$a9~$_(B}$B!J(Bauto-fill$B!K%b!<%I$H8F$P$l$kFCJL$J%^%$%J%b!<%I$r(B
$B%*%s$K$7$F$*$/$H!"9T$,D9$/$J$j$9$.$?$H$-$K(BEmacs$B$,<+F0E*$K9T$rJ,3d$7$^$9!#(B
$B<+F05M$a9~$_!J(Bauto-fill$B!K%b!<%I$N;H$$J}$O!"(B@xref{Filling}$B!#(B
@c If you prefer to have text characters replace (overwrite) existing
@c text rather than shove it to the right, you can enable Overwrite mode,
@c a minor mode. @xref{Minor Modes}.
$B4{B8$N%F%-%9%H$r1&$K2!$7$d$k$N$G$O$J$/!"(B
$B%F%-%9%H$r=g<!CV$-49$($k!J>e=q$-$9$k!K$N$,9%$_$J$i$P!"(B
$B%^%$%J%b!<%I$N(B1$B$D$G$"$k>e=q$-!J(Boverwrite$B!K%b!<%I$r%*%s$K$7$^$9!#(B
@xref{Minor Modes}$B!#(B
@c @cindex quoting
@cindex $B%/%)!<%H(B
@kindex C-q
@findex quoted-insert
@c Direct insertion works for printing characters and @key{SPC}, but other
@c characters act as editing commands and do not insert themselves. If you
@c need to insert a control character or a character whose code is above 200
@c octal, you must @dfn{quote} it by typing the character @kbd{Control-q}
@c (@code{quoted-insert}) first. (This character's name is normally written
@c @kbd{C-q} for short.) There are two ways to use @kbd{C-q}:@refill
$B0u;zJ8;z$H(B@key{SPC}$B$OD>@\A^F~$G$-$^$9$,!"(B
$B$=$l0J30$NJ8;z$OJT=8%3%^%s%I$H$7$F5!G=$7$F!"$=$l<+BN$rA^F~$7$^$;$s!#(B
$B%3%s%H%m!<%kJ8;z$d(B8$B?J$G(B0200$B$rD6$($kJ8;z%3!<%I$NJ8;z$rA^F~$7$?$$>l9g$K$O!"(B
$B$^$:(B@kbd{Control-q}$B!J(B@code{quoted-insert}$B!K$HBG$C$F!"(B
$B$=$l$i$NJ8;z$r(B@dfn{$B%/%)!<%H(B}$B!J(Bquote$B!K(B
@footnote{$B!ZLuCm![$J$s$i$N2r<a$b$;$:$K!"C1$J$kJ8;z$H$7$F07$&!#(B}
$B$9$kI,MW$,$"$j$^$9!#(B
$B!J(B@kbd{Control-q}$B$O!"DL>o!"(B@kbd{C-q}$B$HN,$9!#!K(B
@kbd{C-q}$B$N;H$$J}$K$O!"$D$.$N(B2$B$D$,$"$j$^$9!#(B
@itemize @bullet
@item
@c @kbd{C-q} followed by any non-graphic character (even @kbd{C-g})
@c inserts that character.
@kbd{C-q}$B$KB3$/Hs?^7AJ8;z!J(B@kbd{C-g}$B$G$5$($b!K$rA^F~$9$k!#(B
@item
@c @kbd{C-q} followed by a sequence of octal digits inserts the character
@c with the specified octal character code. You can use any number of
@c octal digits; any non-digit terminates the sequence. If the terminating
@c character is @key{RET}, it serves only to terminate the sequence; any
@c other non-digit is itself used as input after terminating the sequence.
@c (The use of octal sequences is disabled in ordinary non-binary Overwrite
@c mode, to give you a convenient way to insert a digit instead of
@c overwriting with it.)
@kbd{C-q}$B$KB3$/(B8$B?J?t;zNs$O!"(B8$B?J?t;zNs$G;XDj$5$l$k%3!<%I$NJ8;z$rA^F~$9$k!#(B
8$B?J?t;z$N7e?t$O$$$/$D$G$b$+$^$o$:!"(B8$B?J?t;z0J30$G?t;zNs$O=*$k!#(B
$B=*C<$NJ8;z$,(B@key{RET}$B$G$"$l$P!"C1$K?t;zNs$r=*$i$;$k$@$1!#(B
$B$=$l0J30$NHs?t;z$O!"?t;zNs$r=*$i$;$k$@$1$G$J$/!"(B
$B$=$NJ8;z<+?H$bF~NO$H$7$F07$o$l$k!#(B
$B!JIaDL$N>e=q$-!J(Boverwrite$B!K%b!<%I$G$O!"(B
$B>e=q$-$N$+$o$j$KA^F~$r4JC1$K9T$&<jCJ$H$7$F$$$k$?$a!"(B
$B$3$N(B8$B?J?t;zNs$O;H$($J$$!#!K(B
@end itemize
@noindent
@c When multibyte characters are enabled, octal codes 0200 through 0377 are
@c not valid as characters; if you specify a code in this range, @kbd{C-q}
@c assumes that you intend to use some ISO Latin-@var{n} character set, and
@c converts the specified code to the corresponding Emacs character code.
@c @xref{Enabling Multibyte}. You select @emph{which} ISO Latin character
@c set though your choice of language environment (@pxref{Language
@c Environments}).
$B%^%k%A%P%$%HJ8;z$,;HMQ2D$J$i$P!"(B
8$B?J%3!<%I(B0200$B$+$i(B0377$B$^$G$O@5$7$$J8;z$G$O$"$j$^$;$s!#(B
$B$3$NHO0O$N%3!<%I$r;XDj$9$k$H!"(B
@kbd{C-q}$B$O(BISO Latin-@var{n}$BJ8;z=89g$NMxMQ$r0U?^$7$F$$$k$H$_$J$7$F!"(B
$B;XDj$7$?%3!<%I$rBP1~$9$k(BEmacs$BJ8;z%3!<%I$KJQ49$7$^$9!#(B
@xref{Enabling Multibyte}$B!#(B
$B8@8l4D6-$NA*Br!J(B@pxref{Language Environments}$B!K$r2p$7$F!"(B
ISO Latin$BJ8;z=89g$r(B1$B$DA*$S$^$9!#(B
@vindex read-quoted-char-radix
@c To use decimal or hexadecimal instead of octal, set the variable
@c @code{read-quoted-char-radix} to 10 or 16. If the radix is greater than
@c 10, some letters starting with @kbd{a} serve as part of a character
@c code, just like digits.
8$B?J?t$N$+$o$j$K(B10$B?J?t$d(B16$B?J?t$r;H$&$K$O!"(B
$BJQ?t(B@code{read-quoted-char-radix}$B$K(B10$B$d(B16$B$r@_Dj$7$^$9!#(B
$B4p?t$,(B10$B$rD6$($k>l9g$K$O!"(B@kbd{a}$B$+$i;O$^$k$$$/$D$+$N1Q;z$O(B
$BJ8;z%3!<%I$N0lIt$H$7$F?t;z$N7e$HF1$8$h$&$K07$o$l$^$9!#(B
@c A numeric argument to @kbd{C-q} specifies how many copies of the
@c quoted character should be inserted (@pxref{Arguments}).
@kbd{C-q}$B$K?t0z?t$r;XDj$9$k$H!"(B
$B%/%)!<%H$7$?J8;z$r2?8DA^F~$9$k$+$r;XDj$7$^$9!J(B@pxref{Arguments}$B!K!#(B
@findex newline
@findex self-insert
@c Customization information: @key{DEL} in most modes runs the command
@c @code{delete-backward-char}; @key{RET} runs the command @code{newline}, and
@c self-inserting printing characters run the command @code{self-insert},
@c which inserts whatever character was typed to invoke it. Some major modes
@c rebind @key{DEL} to other commands.
$B%+%9%?%^%$%:>pJs!'(B@code{ }
$B$[$H$s$I$N%b!<%I$G$O!"(B
@key{DEL}$B$O%3%^%s%I(B@code{delete-backward-char}$B$r<B9T$7$^$9!#(B
@key{RET}$B$O%3%^%s%I(B@code{newline}$B$r<B9T$7$^$9!#(B
$B<+8JA^F~$N?^7AJ8;z$O%3%^%s%I(B@code{self-insert}$B$r<B9T$7$^$9!#(B
@code{self-insert}$B$O!"$3$l$r5/F0$7$?J8;z$,2?$G$"$C$F$b$=$NJ8;z$rA^F~$7$^$9!#(B
$B$$$/$D$+$N%a%8%c!<%b!<%I$G$O!"(B
@key{DEL}$B$rJL$N%3%^%s%I$K%P%$%s%I$7D>$7$F$$$^$9!#(B
@node Moving Point
@c @section Changing the Location of Point
@section $B%]%$%s%H0LCV$r0\F0$9$k(B
@c @cindex arrow keys
@cindex $BLp0u%-!<(B
@kindex LEFT
@kindex RIGHT
@kindex UP
@kindex DOWN
@c @cindex moving point
@c @cindex movement
@c @cindex cursor motion
@c @cindex moving the cursor
@cindex $B%]%$%s%H$N0\F0(B
@cindex $B0\F0(B
@cindex $B%+!<%=%k$N0\F0(B
@c To do more than insert characters, you have to know how to move point
@c (@pxref{Point}). The simplest way to do this is with arrow keys, or by
@c clicking the left mouse button where you want to move to.
$BJ8;z$NA^F~0J30$N$3$H$r9T$&$K$O!"%]%$%s%H!J(B@pxref{Point}$B!K(B
$B$N0\F0J}K!$rCN$C$F$*$/I,MW$,$"$j$^$9!#(B
$B$b$C$H$b4JC1$JJ}K!$O!"Lp0u%-!<$r;H$&$+!"(B
$B0\F0@h$N2U=j$G%^%&%9$N:8%\%?%s$r%/%j%C%/$7$^$9!#(B
@c There are also control and meta characters for cursor motion. Some
@c are equivalent to the arrow keys (these date back to the days before
@c terminals had arrow keys, and are usable on terminals which don't have
@c them). Others do more sophisticated things.
$B%+!<%=%k0\F0$N$?$a$N%3%s%H%m!<%kJ8;z$d%a%?J8;z$b$"$j$^$9!#(B
$B0lIt$OLp0u%-!<$HF1Ey$G$9(B
$B!J$3$l$i$O!"Lp0u%-!<$rHw$($?C<Kv$,8=$l$k$^$($+$i$"$C$?!#(B
$BLp0u%-!<$,$J$$C<Kv$G$OJXMx!K!#(B
$BB>$N$b$N$O!"$3$C$?$3$H$r$7$^$9!#(B
@kindex C-a
@kindex C-e
@kindex C-f
@kindex C-b
@kindex C-n
@kindex C-p
@kindex M->
@kindex M-<
@kindex M-r
@findex beginning-of-line
@findex end-of-line
@findex forward-char
@findex backward-char
@findex next-line
@findex previous-line
@findex beginning-of-buffer
@findex end-of-buffer
@findex goto-char
@findex goto-line
@findex move-to-window-line
@table @kbd
@item C-a
@c Move to the beginning of the line (@code{beginning-of-line}).
$B9TF,$K0\F0$9$k!J(B@code{beginning-of-line}$B!K!#(B
@item C-e
@c Move to the end of the line (@code{end-of-line}).
$B9TKv$K0\F0$9$k!J(B@code{end-of-line}$B!K!#(B
@item C-f
@c Move forward one character (@code{forward-char}).
$BA08~$-!J1&!K$K(B1$BJ8;z0\F0$9$k!J(B@code{forward-char}$B!K!#(B
@item C-b
@c Move backward one character (@code{backward-char}).
$B8e8~$-!J:8!K$K(B1$BJ8;z0\F0$9$k!J(B@code{backward-char}$B!K!#(B
@item M-f
@c Move forward one word (@code{forward-word}).
$BA08~$-$K(B1$B8l0\F0$9$k!J(B@code{forward-word}$B!K!#(B
@item M-b
@c Move backward one word (@code{backward-word}).
$B8e8~$-$K(B1$B8l0\F0$9$k!J(B@code{backward-word}$B!K!#(B
@item C-n
@c Move down one line, vertically (@code{next-line}). This command
@c attempts to keep the horizontal position unchanged, so if you start in
@c the middle of one line, you end in the middle of the next. When on
@c the last line of text, @kbd{C-n} creates a new line and moves onto it.
$B?bD>$K(B1$B9T2<$X0\F0$9$k!J(B@code{next-line}$B!K!#(B
$B$3$N%3%^%s%I$O9TFb$G$N2#J}8~$N0LCV$rJ]$H$&$H$9$k!#(B
$B$7$?$,$C$F!"9T$NESCf$G;H$&$H!"$D$.$N9T$NESCf$K0\F0$9$k!#(B
$B%F%-%9%H$N:G=*9T$G$"$k>l9g$K$O!"(B
@kbd{C-n}$B$O?7$?$J9T$r:n$j!"$=$N9T$X0\F0$9$k!#(B
@item C-p
@c Move up one line, vertically (@code{previous-line}).
$B?bD>$K(B1$B9T>e$X0\F0$9$k!J(B@code{previous-line}$B!K!#(B
@item M-r
@c Move point to left margin, vertically centered in the window
@c (@code{move-to-window-line}). Text does not move on the screen.
$B%]%$%s%H$r%&%#%s%I%&$N=DJ}8~$NCf1{0LCV$G:8C<$K0\F0$9$k(B
$B!J(B@code{move-to-window-line}$B!K!#(B
$B%F%-%9%H$O2hLL>e$r0\F0$7$J$$!#(B
@c A numeric argument says which screen line to place point on. It counts
@c screen lines down from the top of the window (zero for the top line). A
@c negative argument counts lines from the bottom (@minus{}1 for the bottom
@c line).
$B?t0z?t$O!"2hLL>e$N2?9TL\$K%]%$%s%H$r0\F0$9$k$+$r;XDj$9$k!#(B
$B9T?t$O!"%&%#%s%I%&>eC<!J(B0$B9TL\!K$+$i2<8~$-$K?t$($k!#(B
$BIi$N0z?t$G$O!"%&%#%s%I%&$N2<C<!J(B@minus{}1$B9T!K$+$i?t$($k!#(B
@item M-<
@c Move to the top of the buffer (@code{beginning-of-buffer}). With
@c numeric argument @var{n}, move to @var{n}/10 of the way from the top.
@c @xref{Arguments}, for more information on numeric arguments.@refill
$B%P%C%U%!$N@hF,$K0\F0$9$k!J(B@code{beginning-of-buffer}$B!K!#(B
$B?t0z?t(B@var{n}$B$r;XDj$9$k$H!"@hF,$+$iA4BN$N(B@var{n}/10$B$N9T$K%]%$%s%H$r0\F0$9$k!#(B
$B?t0z?t$N>\:Y$K$D$$$F$O!"(B@pxref{Arguments}$B!#(B
@item M->
@c Move to the end of the buffer (@code{end-of-buffer}).
$B%P%C%U%!$NKvHx$K0\F0$9$k!J(B@code{end-of-buffer}$B!K!#(B
@item M-x goto-char
@c Read a number @var{n} and move point to buffer position @var{n}.
@c Position 1 is the beginning of the buffer.
$B?tCM(B@var{n}$B$rFI$_<h$j!"%P%C%U%!$N(B@var{n}$BHVL\$NJ8;z$K%]%$%s%H$r0\F0$9$k!#(B
$B%P%C%U%!$N@hF,$,0LCV(B1$B!#(B
@item M-x goto-line
@c Read a number @var{n} and move point to line number @var{n}. Line 1
@c is the beginning of the buffer.
$B?tCM(B@var{n}$B$rFI$_<h$j!"(B@var{n}$B9TL\$K%]%$%s%H$r0\F0$9$k!#(B
$B%P%C%U%!$N@hF,$,Bh(B1$B9T!#(B
@item C-x C-n
@findex set-goal-column
@kindex C-x C-n
@c Use the current column of point as the @dfn{semipermanent goal column} for
@c @kbd{C-n} and @kbd{C-p} (@code{set-goal-column}). Henceforth, those
@c commands always move to this column in each line moved into, or as
@c close as possible given the contents of the line. This goal column remains
@c in effect until canceled.
$B8=:_%]%$%s%H$,$"$k7e$r(B@kbd{C-n}$B$d(B@kbd{C-p}$B$N(B
@dfn{$BH>915WE*$JL\I87e(B}$B$H$7$F@_Dj$9$k!#(B
$B$3$N$"$H!"$3$l$i$N%3%^%s%I$O!"0\F0@h$N3F9T$G$3$N7e0LCV$K!"$"$k$$$O!"(B
$B9T$NFbMF$K$h$C$F$O2DG=$J8B$j$3$N7e$K6a$$0LCV$K%]%$%s%H$r0\F0$9$k!#(B
$B$3$NL\I87e$O<h$j>C$9$^$GM-8z!#(B
@item C-u C-x C-n
@c Cancel the goal column. Henceforth, @kbd{C-n} and @kbd{C-p} once
@c again try to stick to a fixed horizontal position, as usual.
$BL\I87e$r<h$j>C$9!#(B
$B$3$l0J8e!"(B@kbd{C-n}$B$d(B@kbd{C-p} $B$O!"DL>o$N$h$&$K(B
$B2#J}8~$N0LCV$rJ]$H$&$H$9$k!#(B
@end table
@vindex track-eol
@c If you set the variable @code{track-eol} to a non-@code{nil} value,
@c then @kbd{C-n} and @kbd{C-p} when at the end of the starting line move
@c to the end of another line. Normally, @code{track-eol} is @code{nil}.
@c @xref{Variables}, for how to set variables such as @code{track-eol}.
$BJQ?t(B@code{track-eol}$B$K(B@code{nil}$B0J30$r@_Dj$9$k$H!"(B
$B9TKv$K%]%$%s%H$,$"$k>l9g$N(B@kbd{C-n}$B$d(B@kbd{C-p}$B$O!"(B
$B0\F0@h$N9T$G$b9TKv$K%]%$%s%H$r0\F0$7$^$9!#(B
$BDL>o!"(B@code{track-eol}$B$O(B@code{nil}$B$G$9!#(B
@code{track-eol}$B$N$h$&$JJQ?t$N@_DjJ}K!$K$D$$$F$O!"(B@xref{Variables}$B!#(B
@vindex next-line-add-newlines
@c Normally, @kbd{C-n} on the last line of a buffer appends a newline to
@c it. If the variable @code{next-line-add-newlines} is @code{nil}, then
@c @kbd{C-n} gets an error instead (like @kbd{C-p} on the first line).
$BDL>o!"%P%C%U%!$N:G=*9T$G$N(B@kbd{C-n}$B$O!"?7$7$$9T$rDI2C$7$^$9!#(B
$BJQ?t(B@code{next-line-add-newlines}$B$,(B@code{nil}$B$G$"$k>l9g!"(B
@kbd{C-n}$B$O?75,$N9T$rDI2C$;$:$K(B
$B!J@hF,9T$G$N(B@kbd{C-p}$B$HF1MM$K!K%(%i!<$K$J$j$^$9!#(B
@node Erasing
@c @section Erasing Text
@section $B%F%-%9%H$N>C5n(B
@table @kbd
@item @key{DEL}
@c Delete the character before point (@code{delete-backward-char}).
$B%]%$%s%H$ND>A0$NJ8;z$r:o=|$9$k!J(B@code{delete-backward-char}$B!K!#(B
@item C-d
@c Delete the character after point (@code{delete-char}).
$B%]%$%s%H$ND>8e$NJ8;z$r:o=|$9$k!J(B@code{delete-char}$B!K!#(B
@item C-k
@c Kill to the end of the line (@code{kill-line}).
$B9TKv$^$G$r%-%k$9$k!J(B@code{kill-line}$B!K!#(B
@item M-d
@c Kill forward to the end of the next word (@code{kill-word}).
$B$D$.$N8l$NKvHx$^$G$rA08~$-$K%-%k$9$k!J(B@code{kill-word}$B!K!#(B
@item M-@key{DEL}
@c Kill back to the beginning of the previous word
@c (@code{backward-kill-word}).
$B$^$($N8l$N@hF,$^$G$r8e8~$-$K%-%k$9$k!J(B@code{backward-kill-word}$B!K!#(B
@end table
@c @cindex killing characters and lines
@c @cindex deleting characters and lines
@c @cindex erasing characters and lines
@cindex $BJ8;z$d9T$N%-%k(B
@cindex $BJ8;z$d9T$N:o=|(B
@cindex $BJ8;z$d9T$N>C5n(B
@c You already know about the @key{DEL} key which deletes the character
@c before point (that is, before the cursor). Another key, @kbd{Control-d}
@c (@kbd{C-d} for short), deletes the character after point (that is, the
@c character that the cursor is on). This shifts the rest of the text on
@c the line to the left. If you type @kbd{C-d} at the end of a line, it
@c joins together that line and the next line.
$B%]%$%s%H$ND>A0!J$D$^$j!"%+!<%=%k$ND>A0!K$NJ8;z$r:o=|$9$k(B
@key{DEL}$B%-!<$K$D$$$F$O$9$G$KCN$C$F$$$^$9$M!#(B
@kbd{Control-d}$B!J(B@kbd{C-d}$B$HN,5-!K$O!"%]%$%s%H$ND>8e$NJ8;z(B
$B!J$D$^$j!"%+!<%=%k$,=E$J$C$F$$$kJ8;z!K$r:o=|$7$^$9!#(B
$B$9$k$H!";D$j$N%F%-%9%H$O:8$K0\F0$7$^$9!#(B
$B9TKv$G(B@kbd{C-d}$B$rBG$D$H!"$=$N9T$H$D$.$N9T$,O"7k$5$l$^$9!#(B
@c To erase a larger amount of text, use the @kbd{C-k} key, which kills a
@c line at a time. If you type @kbd{C-k} at the beginning or middle of a
@c line, it kills all the text up to the end of the line. If you type
@c @kbd{C-k} at the end of a line, it joins that line and the next line.
$BBgNL$N%F%-%9%H$r>C5n$9$k$K$O!"(B@kbd{C-k}$B$r;H$$$^$9!#(B
@kbd{C-k}$B$O(B1$B9T$r0lEY$K%-%k$7$^$9!#(B
$B9TF,$d9T$NESCf$G(B@kbd{C-k}$B$rBG$D$H!"(B
$B9TKv$^$G$N$9$Y$F$N%F%-%9%H$r%-%k$7$^$9!#(B
$B9TKv$G(B@kbd{C-k}$B$rBG$D$H!"$=$N9T$H$D$.$N9T$rO"7k$7$^$9!#(B
@c @xref{Killing}, for more flexible ways of killing text.
$B$h$j=@Fp$J%F%-%9%H$N%-%k$K$D$$$F$N>\:Y$O!"(B@xref{Killing}$B!#(B
@node Undo
@c @section Undoing Changes
@section $BJQ99$r%"%s%I%%$9$k!J$b$H$KLa$9!K(B
@c @cindex undo
@c @cindex changes, undoing
@cindex $B%"%s%I%%!J$b$H$KLa$9!K(B
@cindex $BJQ99!"$b$H$KLa$9(B
@c You can undo all the recent changes in the buffer text, up to a
@c certain point. Each buffer records changes individually, and the undo
@c command always applies to the current buffer. Usually each editing
@c command makes a separate entry in the undo records, but some commands
@c such as @code{query-replace} make many entries, and very simple commands
@c such as self-inserting characters are often grouped to make undoing less
@c tedious.
$B%P%C%U%!$N%F%-%9%H$KBP$9$kJQ99$O!"$"$k;~E@$^$GAL$C$F!"(B
$B$9$Y$F%"%s%I%%!J$b$H$KLa$9$3$H$,!K$G$-$^$9!#(B
$B3F%P%C%U%!$G$O8D!9$NJQ99$r$=$l$>$l5-O?$7$F$$$F!"(B
$B%"%s%I%%%3%^%s%I$O!"$D$M$K%+%l%s%H%P%C%U%!$K:nMQ$7$^$9!#(B
$BDL>o!"3FJT=8%3%^%s%I$O%"%s%I%%5-O?$KJL!9$N9`L\$r:n@.$7$^$9$,!"(B
@code{query-replace}$B$N$h$&$J%3%^%s%I$O0lEY$KB?$/$N9`L\$r:n$j$^$9$7!"(B
$B<+8JA^F~J8;z$N$h$&$KHs>o$KC1=c$J%3%^%s%I$O!"(B
$B$b$H$KLa$9$N$rC1=c$K$9$k$?$a$K!"$^$H$a$i$l$^$9!#(B
@table @kbd
@item C-x u
@c Undo one batch of changes---usually, one command worth (@code{undo}).
$B0l2t$NJQ99$r$b$H$KLa$9!#(B
$BIaDL!"(B1$B$D$N%3%^%s%I$KAjEv$9$k!J(B@code{undo}$B!K!#(B
@item C-_
@c The same.
$BF1$8!#(B
@item C-u C-x u
@c Undo one batch of changes in the region.
$B%j!<%8%g%sFb$G!"0l2t$NJQ99$r$b$H$KLa$9!#(B
@end table
@kindex C-x u
@kindex C-_
@findex undo
@c The command @kbd{C-x u} or @kbd{C-_} is how you undo. The first time
@c you give this command, it undoes the last change. Point moves back to
@c where it was before the command that made the change.
$BJQ99$r$b$H$KLa$9$K$O!"%3%^%s%I!"(B@kbd{C-x u}$B$d(B@kbd{C-_}$B$r;H$$$^$9!#(B
$B;O$a$K$3$N%3%^%s%I$r<B9T$9$k$H!"D>A0$NJQ99$r$b$H$KLa$7$^$9!#(B
$B%]%$%s%H$O!"$b$H$KLa$5$l$?%3%^%s%I$r<B9T$9$k$^$($N0LCV$KLa$j$^$9!#(B
@c Consecutive repetitions of @kbd{C-_} or @kbd{C-x u} undo earlier and
@c earlier changes, back to the limit of the undo information available.
@c If all recorded changes have already been undone, the undo command
@c prints an error message and does nothing.
@kbd{C-_}$B$d(B@kbd{C-x u}$B$rO"B3$7$F<B9T$9$k$H!"(B
$B%"%s%I%%>pJs$N8B3&$KC#$9$k$^$G!"(B
$B<!!9$K0JA0$NJQ99$r$b$H$KLa$7$F$$$-$^$9!#(B
$B5-O?$5$l$F$$$k$9$Y$F$NJQ99$r$b$H$KLa$7$F$7$^$&$H!"(B
$B%"%s%I%%%3%^%s%I$O$=$N;]%(%i!<%a%C%;!<%8$rI=<($7$^$9!#(B
@c Any command other than an undo command breaks the sequence of undo
@c commands. Starting from that moment, the previous undo commands become
@c ordinary changes that you can undo. Thus, to redo changes you have
@c undone, type @kbd{C-f} or any other command that will harmlessly break
@c the sequence of undoing, then type more undo commands.
$B%"%s%I%%%3%^%s%I0J30$NB>$N%3%^%s%I$r<B9T$9$k$H!"(B
$B%"%s%I%%%3%^%s%I$NO"B3<B9T7ONs$,CG$A@Z$i$l$^$9!#(B
$B$3$l0J8e!"$3$l$h$j$^$($N%"%s%I%%%3%^%s%I$N<B9T<+BN$,!"(B
$B$b$H$KLa$9$3$H$,2DG=$J0lHL$NJQ99$H$7$F07$o$l$^$9!#(B
$B$7$?$,$C$F!"$b$H$KLa$7$F$7$^$C$?JQ99$r$d$O$j$=$N$H$*$j$K(B
$BJQ99$7$F$*$-$?$$>l9g$K$O!"(B
@kbd{C-f}$B$HBG$D$+!"$"$k$$$O!"L532$J%3%^%s%I$r<B9T$7$F(B
$B%"%s%I%%$NO"B3<B9T7ONs$rCG$A@Z$C$F$+$i!"$5$i$K%"%s%I%%%3%^%s%I$rBG$A$^$9!#(B
@c @cindex selective undo
@cindex $BA*BrE*$J%"%s%I%%(B
@kindex C-u C-x u
@c Ordinary undo applies to all changes made in the current buffer. You
@c can also perform @dfn{selective undo}, limited to the current region.
@c To do this, specify the region you want, then run the @code{undo}
@c command with a prefix argument (the value does not matter): @kbd{C-u C-x
@c u} or @kbd{C-u C-_}. This undoes the most recent change in the region.
@c To undo further changes in the same region, repeat the @code{undo}
@c command (no prefix argument is needed). In Transient Mark mode, any use
@c of @code{undo} when there is an active region performs selective undo;
@c you do not need a prefix argument.
$BIaDL$N%"%s%I%%$O!"%+%l%s%H%P%C%U%!$K$*$1$k$9$Y$F$NJQ99$K:nMQ$7$^$9!#(B
$B%+%l%s%H%j!<%8%g%sFb$K@)8B$7$?(B@dfn{$BA*BrE*$J%"%s%I%%(B}$B!J(Bselective undo$B!K$r(B
$B9T$&$3$H$b$G$-$^$9!#(B
$B$3$l$K$O!"%j!<%8%g%s$r@_Dj$7$F$+$i!"?t0z?t!JCM$O4X78$J$$!K$r;XDj$7$F(B
@code{undo}$B%3%^%s%I$r!"$D$^$j!"(B@kbd{C-u C-x u}$B$d(B@kbd{C-u C-_}$B$r<B9T$7$^$9!#(B
$B$3$l$K$h$j!"%j!<%8%g%sFb$N$b$C$H$b:G6a$NJQ99$,$b$H$KLa$j$^$9!#(B
$BF1$8%j!<%8%g%sFb$NJQ99$r$5$i$K$b$H$KLa$9$K$O!"(B
@code{undo}$B%3%^%s%I$r7+$jJV$7$^$9!J$3$l$K$O?t0z?t$OI,MW$J$$!K!#(B
$B;CDj%^!<%/!J(Btransient-mark$B!K%b!<%I$G$O!"(B
$B%j!<%8%g%s$,3h@-$N$H$-$K(B@code{undo}$B$r;H$&$HA*BrE*$J%"%s%I%%$r9T$$$^$9!#(B
$B$D$^$j!"?t0z?t$OI,MW$"$j$^$;$s!#(B
@c If you notice that a buffer has been modified accidentally, the
@c easiest way to recover is to type @kbd{C-_} repeatedly until the stars
@c disappear from the front of the mode line. At this time, all the
@c modifications you made have been canceled. Whenever an undo command
@c makes the stars disappear from the mode line, it means that the buffer
@c contents are the same as they were when the file was last read in or
@c saved.
$B%P%C%U%!$r8m$C$FJQ99$7$F$7$^$C$?>l9g!"(B
$B$b$H$KLa$9$b$C$H$b4JC1$JJ}K!$O!"%b!<%I9T$N@hF,ItJ,$+$i@10u$,(B
$B>C$($k$^$G(B@kbd{C-_}$B$r7+$jJV$7BG$D$3$H$G$9!#(B
$B$=$&$9$l$P!"$9$Y$F$N=$@5$r<h$j>C$7$?$3$H$K$J$j$^$9!#(B
$B%"%s%I%%%3%^%s%I$K$h$j%b!<%I9T$+$i@10u$,>C$($?>l9g$O$D$M$K!"(B
$B%P%C%U%!$NFbMF$,%U%!%$%k$rK,Ld$7$?$H$-$HF1$8$G$"$k$+!"(B
$B:G8e$KJ]B8$7$?$H$-$HF1$8$G$"$k$3$H$r0UL#$7$^$9!#(B
@c If you do not remember whether you changed the buffer deliberately,
@c type @kbd{C-_} once. When you see the last change you made undone, you
@c will see whether it was an intentional change. If it was an accident,
@c leave it undone. If it was deliberate, redo the change as described
@c above.
$B0U?^$7$F%P%C%U%!$rJQ99$7$?$+$I$&$+$"$d$U$d$J$H$-$O!"(B
$B0lEY$@$1(B@kbd{C-_}$B$rBG$A$^$9!#(B
$B$b$H$KLa$9$3$H$G:G8e$NJQ992U=j$,$o$+$j$^$9$+$i!"(B
$B$=$l$,0U?^$7$?JQ99$+$I$&$+H=CG$G$-$k$G$7$g$&!#(B
$B0U?^$7$?JQ99$G$J$1$l$P!"$b$H$KLa$7$?$^$^$K$7$F$*$-$^$9!#(B
$B0U?^$7$?JQ99$G$"$C$?$J$i!">e5-$NJ}K!$GJQ99$7D>$7$^$9!#(B
@c Not all buffers record undo information. Buffers whose names start with
@c spaces don't; these buffers are used internally by Emacs and its extensions
@c to hold text that users don't normally look at or edit.
$B$9$Y$F$N%P%C%U%!$G%"%s%I%%>pJs$r5-O?$9$k$o$1$G$O$"$j$^$;$s!#(B
$B6uGr$G;O$^$kL>A0$N%P%C%U%!$G$O5-O?$7$^$;$s!#(B
$B$3$l$i$N%P%C%U%!$O!"(B
Emacs$B$d$=$N3HD%ItJ,$,FbItE*$K;HMQ$9$k$b$N$G!"(B
$B%f!<%6!<$,DL>o8+$?$jJT=8$7$?$j$7$J$$%F%-%9%H$rJ];}$7$F$$$^$9!#(B
@c You cannot undo mere cursor motion; only changes in the buffer
@c contents save undo information. However, some cursor motion commands
@c set the mark, so if you use these commands from time to time, you can
@c move back to the neighborhoods you have moved through by popping the
@c mark ring (@pxref{Mark Ring}).
$BC1$J$k%+!<%=%k0\F0$O%"%s%I%%$G$-$^$;$s!#(B
$B%P%C%U%!$NFbMF$rJQ99$7$?$H$-$@$1%"%s%I%%>pJs$,J]B8$5$l$^$9!#(B
$B$?$@$7!"$$$/$D$+$N%+!<%=%k0\F0%3%^%s%I$O%^!<%/$r@_Dj$7$^$9$+$i!"(B
$B$3$l$i$N%3%^%s%I$r$H$-$I$-;H$($P!"(B
$B%^!<%/%j%s%0!J(B@pxref{Mark Ring}$B!K$+$i<h$j=P$7$J$,$i!"(B
$BDL$C$F$-$?$=$l$>$l$N2U=j$XLa$k$3$H$,$G$-$^$9!#(B
@vindex undo-limit
@vindex undo-strong-limit
@c @cindex undo limit
@cindex $B%"%s%I%%$N8B3&(B
@c When the undo information for a buffer becomes too large, Emacs
@c discards the oldest undo information from time to time (during garbage
@c collection). You can specify how much undo information to keep by
@c setting two variables: @code{undo-limit} and @code{undo-strong-limit}.
@c Their values are expressed in units of bytes of space.
$B%P%C%U%!$K4X$9$k%"%s%I%%>pJs$,Bg$-$/$J$k$H!"(B
Emacs$B$O$b$C$H$b8E$$%"%s%I%%>pJs$+$i=g$K!J%,%Y%C%8%3%l%/%7%g%sCf$K!K(B
$BGK4~$7$F$$$-$^$9!#(B
$BJ];}$9$Y$-%"%s%I%%>pJs$NNL$r;XDj$9$k$K$O!"(B
2$B$D$NJQ?t(B@code{undo-limit}$B$H(B@code{undo-strong-limit}$B$r@_Dj$7$^$9!#(B
$B$3$l$i$NJQ?t$NCM$O!"J]B8NN0h$N%P%$%H?t$G$9!#(B
@c The variable @code{undo-limit} sets a soft limit: Emacs keeps undo
@c data for enough commands to reach this size, and perhaps exceed it, but
@c does not keep data for any earlier commands beyond that. Its default
@c value is 20000. The variable @code{undo-strong-limit} sets a stricter
@c limit: the command which pushes the size past this amount is itself
@c forgotten. Its default value is 30000.
$BJQ?t(B@code{undo-limit}$B$O4K$$8B3&!J(Bsoft limit$B!K$r@_Dj$7$^$9!#(B
Emacs$B$O!"$3$N%5%$%:$KC#$9$k$^$G$N%3%^%s%IJ,$N%"%s%I%%%G!<%?$rJ];}$7$^$9!#(B
$B%G!<%?NL$,$3$N%5%$%:$rD6$($k>l9g$b$"$j$^$9$,!"(B
$B$3$N%G!<%?NL$rD6$($k$h$&$J8E$$%3%^%s%IJ,$N%G!<%?$OJ];}$7$^$;$s!#(B
$B%G%U%)%k%H$O!"(B20000$B$G$9!#(B
$BJQ?t(B@code{undo-strong-limit}$B$O!"87L)$J8B3&!J(Bstricter limit$B!K$r@_Dj$7$^$9!#(B
$B$3$NNL$rD6$($k%G!<%?$KBP1~$9$k%3%^%s%I$N%G!<%?$OGK4~$7$^$9!#(B
$B=i4|CM$O(B30000$B$G$9!#(B
@c Regardless of the values of those variables, the most recent change is
@c never discarded, so there is no danger that garbage collection occurring
@c right after an unintentional large change might prevent you from undoing
@c it.
$B$3$l$i$NJQ?t$NCM$K4X$o$i$:!":G?7$NJQ99$rGK4~$9$k$3$H$O$"$j$^$;$s$N$G!"(B
$B0U?^$7$J$$Bg$-$JJQ99$r2C$($F$7$^$C$?D>8e$K(B
$B%,%Y%C%8%3%l%/%7%g%s$,H/@8$7$F$b!"(B
$B$=$NJQ99$r%"%s%I%%$G$-$J$$$H$$$&$h$&$J$3$H$O$"$j$^$;$s!#(B
@c The reason the @code{undo} command has two keys, @kbd{C-x u} and
@c @kbd{C-_}, set up to run it is that it is worthy of a single-character
@c key, but on some keyboards it is not obvious how to type @kbd{C-_}.
@c @kbd{C-x u} is an alternative you can type straightforwardly on any
@c terminal.
$B%"%s%I%%%3%^%s%I$r<B9T$9$k%-!<$,(B@kbd{C-x u}$B$H(B@kbd{C-_}$B$H(B2$B$D$"$kM}M3$O!"(B
1$BJ8;z%-!<$K$9$k$[$I=EMW$J$N$G$9$,!"$I$&$d$C$F(B@kbd{C-_}$B$rBG$D$+<+L@$G$J$$(B
$B%-!<%\!<%I$b$"$k$+$i$G$9!#(B
@kbd{C-x u}$B$O!"$I$NC<Kv$G$bAGD>$KBG$F$kBeBX<jCJ$J$N$G$9!#(B
@node Basic Files
@c @section Files
@section $B%U%!%$%k(B
@c The commands described above are sufficient for creating and altering
@c text in an Emacs buffer; the more advanced Emacs commands just make
@c things easier. But to keep any text permanently you must put it in a
@c @dfn{file}. Files are named units of text which are stored by the
@c operating system for you to retrieve later by name. To look at or use
@c the contents of a file in any way, including editing the file with
@c Emacs, you must specify the file name.
Emacs$B%P%C%U%!Fb$G%F%-%9%H$r:n@.$7$?$jJQ99$7$?$j$9$k$K$O!"(B
$B$3$l$^$G$K@bL@$7$?%3%^%s%I$G==J,$J$O$:$G$9!#(B
$B$h$j9bEY$J(BEmacs$B%3%^%s%I$H$$$C$F$b!"(B
$B$3$l$i$NA`:n$rMF0W$K$9$k$@$1$G$9!#(B
$B$7$+$7!"%F%-%9%H$r915WE*$J$b$N$H$9$k$K$O!"(B
@dfn{$B%U%!%$%k(B}$B!J(Bfile$B!K$KJ]B8$9$kI,MW$,$"$j$^$9!#(B
$B%U%!%$%k$H$O!"(B
$B%*%Z%l!<%F%#%s%0%7%9%F%`$,J]B8$9$k$?$a$KL>A0$rIU$1$?%F%-%9%H$N0l2t$G$"$j!"(B
$B$"$H$G$=$NL>A0$G<h$j=P$;$^$9!#(B
Emacs$B$G%U%!%$%k$rJT=8$9$k>l9g$r4^$a$F!"(B
$B%U%!%$%k$NFbMF$rD/$a$?$jMxMQ$7$?$j$9$k$K$O!"(B
$B%U%!%$%kL>$r;XDj$9$kI,MW$,$"$j$^$9!#(B
@c Consider a file named @file{/usr/rms/foo.c}. In Emacs, to begin editing
@c this file, type
@file{/usr/rms/foo.c}$B$H$$$&L>A0$N%U%!%$%k$,$"$k$H$7$^$7$g$&!#(B
$B$3$N%U%!%$%k$rJT=8$7;O$a$k$K$O!"(BEmacs$B$G$O$D$.$N$h$&$KBG$A$^$9!#(B
@example
C-x C-f /usr/rms/foo.c @key{RET}
@end example
@noindent
@c Here the file name is given as an @dfn{argument} to the command @kbd{C-x
@c C-f} (@code{find-file}). That command uses the @dfn{minibuffer} to
@c read the argument, and you type @key{RET} to terminate the argument
@c (@pxref{Minibuffer}).@refill
$B$3$3$G!"%U%!%$%kL>$O!"%3%^%s%I(B@kbd{C-x C-f}$B!J(B@code{find-file}$B!K$KBP$9$k(B
@dfn{$B0z?t(B}$B!J(Bargument$B!K$H$7$FM?$($^$9!#(B
$B$3$N%3%^%s%I$O0z?t$rFI$`$?$a$K(B@dfn{$B%_%K%P%C%U%!(B}$B$r;H$$$^$9!#(B
$B0z?t$NF~NO$r=*$($k$K$O!"(B@key{RET}$B$rBG$A$^$9!J(B@pxref{Minibuffer}$B!K!#(B
@c Emacs obeys the command by @dfn{visiting} the file: creating a buffer,
@c copying the contents of the file into the buffer, and then displaying
@c the buffer for you to edit. If you alter the text, you can @dfn{save}
@c the new text in the file by typing @kbd{C-x C-s} (@code{save-buffer}).
@c This makes the changes permanent by copying the altered buffer contents
@c back into the file @file{/usr/rms/foo.c}. Until you save, the changes
@c exist only inside Emacs, and the file @file{foo.c} is unaltered.
Emacs$B$O%3%^%s%I$K=>$$!"%U%!%$%k$r(B@dfn{$BK,Ld(B}$B!J(Bvisiting$B!K$7$^$9!#(B
$B$D$^$j!"%P%C%U%!$r:n@.$7!"%U%!%$%k$NFbMF$r$=$N%P%C%U%!$K%3%T!<$7!"(B
$B%f!<%6!<$,JT=8$G$-$k$h$&$K$=$N%P%C%U%!$rI=<($7$^$9!#(B
$B%F%-%9%H$rJQ99$7$?$i!"(B@kbd{C-x C-s}$B!J(B@code{save-buffer}$B!K$HBG$F$P!"(B
$B?7$7$$%F%-%9%H$r%U%!%$%k$K(B@dfn{$BJ]B8(B}$B!J(Bsave$B!K$G$-$^$9!#(B
$B$3$l$K$h$j!"%P%C%U%!$NJQ99$7$?FbMF$r(B
$B%U%!%$%k(B@file{/usr/rms/foo.c}$B$K%3%T!<$7La$7$?$N$G!"(B
$BJQ99$O915WE*$K$J$j$^$9!#(B
$B%f!<%6!<$,J]B8$9$k$^$G$O!"JQ99$O(BEmacs$BFbIt$N$_$KB8:_$9$k$@$1$G!"(B
$B%U%!%$%k(B@file{foo.c}$B<+BN$OL$JQ99$N$^$^$G$9!#(B
@c To create a file, just visit the file with @kbd{C-x C-f} as if it
@c already existed. This creates an empty buffer in which you can insert
@c the text you want to put in the file. The file is actually created when
@c you save this buffer with @kbd{C-x C-s}.
$B%U%!%$%k$r:n@.$9$k$K$O!"$=$N%U%!%$%k$,4{B8$G$"$k$+$N$h$&$K!"(B
@kbd{C-x C-f}$B$G%U%!%$%k$rK,Ld$9$k$@$1$G$9!#(B
$B$3$l$K$h$j!"6u$N%P%C%U%!$,:n$i$l!"(B
$B%U%!%$%k$K<}$a$?$$%F%-%9%H$rA^F~$G$-$k$h$&$K$J$j$^$9!#(B
@kbd{C-x C-s}$B$G%P%C%U%!$rJ]B8$7$?$H$-$K!"(B
$B%U%!%$%k$,<B:]$K:n@.$5$l$^$9!#(B
@c Of course, there is a lot more to learn about using files. @xref{Files}.
$B$b$A$m$s!"%U%!%$%k$K$D$$$F$O$b$C$HCN$C$F$*$/I,MW$,$"$j$^$9!#(B
@xref{Files}$B!#(B
@node Basic Help
@c @section Help
@section $B%X%k%W(B
@c @cindex getting help with keys
@cindex $B%-!<$N%X%k%WI=<((B
@c If you forget what a key does, you can find out with the Help
@c character, which is @kbd{C-h} (or @key{F1}, which is an alias for
@c @kbd{C-h}). Type @kbd{C-h k} followed by the key you want to know
@c about; for example, @kbd{C-h k C-n} tells you all about what @kbd{C-n}
@c does. @kbd{C-h} is a prefix key; @kbd{C-h k} is just one of its
@c subcommands (the command @code{describe-key}). The other subcommands of
@c @kbd{C-h} provide different kinds of help. Type @kbd{C-h} twice to get
@c a description of all the help facilities. @xref{Help}.@refill
$B%-!<$N5!G=$rK:$l$F$7$^$C$?>l9g$K$O!"(B
$B%X%k%WJ8;z(B@kbd{C-h}$B!J$"$k$$$O(B@kbd{C-h}$B$NJLL>$G$"$k(B@key{F1}$B!K$r;H$C$F!"(B
$BD4$Y$i$l$^$9!#(B
@kbd{C-h k}$B$HBG$C$F$+$i!"D4$Y$?$$%-!<$rB3$1$FBG$A$^$9!#(B
$B$?$H$($P!"(B@kbd{C-h k C-n}$B$O!"(B@kbd{C-n}$B$,2?$r$9$k$+65$($F$/$l$^$9!#(B
@kbd{C-h}$B$O%W%l%U%#%C%/%9%-!<$G$9!#(B
@kbd{C-h k}$B$O!"(B@kbd{C-h}$B$N(B1$B$D$N%5%V%3%^%s%I(B
$B!J%3%^%s%I(B@code{describe-key}$B!K$G$9!#(B
@kbd{C-h}$B$K$OB>$K$b%5%V%3%^%s%I$,$"$j!"(B
$B$=$l$>$l0[$J$k<oN`$N%X%k%W$rI=<($7$^$9!#(B
@kbd{C-h}$B$r(B2$B2sBG$F$P!"%X%k%W5!G=<+BN$N@bL@$r8+$k$3$H$,$G$-$^$9!#(B
@xref{Help}$B!#(B
@node Blank Lines
@c @section Blank Lines
@section $B6u9T(B
@c @cindex inserting blank lines
@c @cindex deleting blank lines
@cindex $B6u9T$NA^F~(B
@cindex $B6u9T$N:o=|(B
@c Here are special commands and techniques for putting in and taking out
@c blank lines.
$B6u9T$NA^F~$H:o=|$K4X$9$kFCJL$J%3%^%s%I$d5;K!$r>R2p$7$^$9!#(B
@c widecommands
@table @kbd
@item C-o
@c Insert one or more blank lines after the cursor (@code{open-line}).
$B%+!<%=%k$ND>8e$K(B1$B9T0J>e$N6u9T$rA^F~$9$k!J(B@code{open-line}$B!K!#(B
@item C-x C-o
@c Delete all but one of many consecutive blank lines
@c (@code{delete-blank-lines}).
$BO"B3$9$k6u9T$r(B1$B9T$@$1;D$7$F$9$Y$F:o=|$9$k!J(B@code{delete-blank-lines}$B!K!#(B
@end table
@kindex C-o
@kindex C-x C-o
@c @cindex blank lines
@cindex $B6u9T(B
@findex open-line
@findex delete-blank-lines
@c When you want to insert a new line of text before an existing line, you
@c can do it by typing the new line of text, followed by @key{RET}.
@c However, it may be easier to see what you are doing if you first make a
@c blank line and then insert the desired text into it. This is easy to do
@c using the key @kbd{C-o} (@code{open-line}), which inserts a newline
@c after point but leaves point in front of the newline. After @kbd{C-o},
@c type the text for the new line. @kbd{C-o F O O} has the same effect as
@c @w{@kbd{F O O @key{RET}}}, except for the final location of point.
$B4{B8$N9T$N$^$($K?7$?$K(B1$B9T$rA^F~$9$k$K$O!"(B
$B?7$7$$9T$N%F%-%9%H$rBG$C$F$+$i(B@key{RET}$B$rBG$D$3$H$b$G$-$^$9!#(B
$B$7$+$7!"$^$:6u9T$r:n$C$F$+$i!"(B
$B$=$3$K4uK>$N%F%-%9%H$rA^F~$9$k$[$&$,2?$r$7$F$$$k$N$+$,$o$+$j$d$9$$$G$7$g$&!#(B
$B%-!<(B@kbd{C-o}$B!J(B@code{open-line}$B!K$r;H$($P4JC1$G$9!#(B
$B$3$l$O%]%$%s%H$ND>8e$K2~9T$rA^F~$7$F!"(B
$B%]%$%s%H$O2~9T$ND>A0$KCV$+$l$?$^$^$H$J$j$^$9!#(B
@kbd{C-o}$B$KB3$1$F!"?7$7$$9T$N%F%-%9%H$rBG$A$^$9!#(B
@kbd{C-o F O O}$B$O!"%]%$%s%H$N:G=*E*$J0LCV$r=|$1$P!"(B
@w{@kbd{F O O @key{RET}}}$B$HF1$88z2L$r;}$A$^$9!#(B
@c You can make several blank lines by typing @kbd{C-o} several times, or
@c by giving it a numeric argument to tell it how many blank lines to make.
@c @xref{Arguments}, for how. If you have a fill prefix, then @kbd{C-o}
@c command inserts the fill prefix on the new line, when you use it at the
@c beginning of a line. @xref{Fill Prefix}.
$BJ#?t$N6u9T$r:n$k$K$O!"(B@kbd{C-o}$B$r?t2sBG$D$+!"(B
$B:n$j$?$$6u9T$N8D?t$r;XDj$9$k?t0z?t$r;XDj$7$^$9!#(B
$B?t0z?t$N;XDjJ}K!$O!"(B@xref{Arguments}$B!#(B
$B5M$a9~$_@\F,<-$r@_Dj$7$F$"$k>l9g!"(B
$B9T$N@hF,$G(B@kbd{C-o}$B%3%^%s%I$r;H$&$H!"(B
$B$3$N%3%^%s%I$O?7$7$$9T$K5M$a9~$_@\F,<-$rA^F~$7$^$9!#(B
@xref{Fill Prefix}$B!#(B
@c The easy way to get rid of extra blank lines is with the command
@c @kbd{C-x C-o} (@code{delete-blank-lines}). @kbd{C-x C-o} in a run of
@c several blank lines deletes all but one of them. @kbd{C-x C-o} on a
@c solitary blank line deletes that blank line. When point is on a
@c nonblank line, @kbd{C-x C-o} deletes any blank lines following that
@c nonblank line.
$BM>J,$J6u9T$r:o=|$9$k$K$O!"(B
$B%3%^%s%I(B@kbd{C-x C-o}$B!J(B@code{delete-blank-lines}$B!K$r;H$$$^$9!#(B
$BO"B3$9$kJ#?t$N6u9T$NCf$G(B@kbd{C-x C-o}$B$r<B9T$9$k$H!"(B
1$B9T$r;D$7$F$9$Y$F$N6u9T$r:o=|$7$^$9!#(B
$B6u9T$,(B1$B9T$@$1$N>l9g!"$=$N6u9T<+BN$r:o=|$7$^$9!#(B
$B6u9T$G$J$$9T$K%]%$%s%H$,$"$k>l9g!"(B
$B$=$N9T$KB3$/$9$Y$F$N6u9T$r:o=|$7$^$9!#(B
@node Continuation Lines
@c @section Continuation Lines
@section $B7QB39T(B
@c @cindex continuation line
@cindex $B7QB39T(B
@c @cindex wrapping
@cindex $B@^$jJV$7(B
@c @cindex line wrapping
@cindex $B9T$N@^$jJV$7(B
@c If you add too many characters to one line without breaking it with
@c @key{RET}, the line will grow to occupy two (or more) lines on the screen,
@c with a @samp{\} at the extreme right margin of all but the last of them.
@c The @samp{\} says that the following screen line is not really a distinct
@c line in the text, but just the @dfn{continuation} of a line too long to fit
@c the screen. Continuation is also called @dfn{line wrapping}.
@key{RET}$B$GJ,3d$;$:$K(B1$B9T$KJ8;z$r2C$(B3$1$k$H!"(B
$B$=$N9T$O2hLL>e$G(B2$B9T0J>e$r@j$a$k$h$&$K$J$j$^$9!#(B
$B$3$N$H$-!"$=$N$h$&$J9T$N:G8e$N9T$r=|$/$9$Y$F$N9T$N1&C<$K$O!"(B
@samp{\}$B$,I=<($5$l$^$9!#(B
$B$3$N(B@samp{\}$B$O!"2hLL>e$N8eB3$N9T$O%F%-%9%HFb$NFHN)$7$?9T$G$O$J$/!"(B
$B2hLL$K<}$^$j$-$i$J$$D9$$9T$,(B@dfn{$B7QB3(B}$B!J(Bcontinuation$B!K(B
$B$7$F$$$k$3$H$r0UL#$7$^$9!#(B
$B$3$N7QB3$r!"(B@dfn{$B@^$jJV$7(B}$B!J(Bwrapping$B!K$H$b8F$S$^$9!#(B
@c Sometimes it is nice to have Emacs insert newlines automatically when
@c a line gets too long. Continuation on the screen does not do that. Use
@c Auto Fill mode (@pxref{Filling}) if that's what you want.
$B9T$,D9$/$J$j$9$.$?$H$-$K(BEmacs$B$,<+F0E*$K2~9T$rA^F~$9$k$HJXMx$J$3$H$,$"$j$^$9!#(B
$B2hLL>e$G$N7QB3$O!"$3$N$h$&$K$O5!G=$7$^$;$s!#(B
$B<+F0E*$K2~9T$9$k$h$&$K$9$k$K$O!"(B
$B<+F05M$a9~$_!J(Bauto-fill$B!K%b!<%I!J(B@pxref{Filling}$B!K$r;H$$$^$9!#(B
@vindex truncate-lines
@c @cindex truncation
@cindex $B@Z$j<N$F(B
@c As an alternative to continuation, Emacs can display long lines by
@c @dfn{truncation}. This means that all the characters that do not fit in
@c the width of the screen or window do not appear at all. They remain in
@c the buffer, temporarily invisible. @samp{$} is used in the last column
@c instead of @samp{\} to inform you that truncation is in effect.
$B7QB3$N$+$o$j$NJ}K!$H$7$F!"(BEmacs$B$OD9$$9T$r(B@dfn{$B@Z$j<N$F(B}$B!J(Btruncation$B!K$F(B
$BI=<($9$k$3$H$b$G$-$^$9!#(B
$B$D$^$j!"2hLL$d%&%#%s%I%&$NI}$K<}$^$j$-$i$J$$J8;z$OI=<($7$^$;$s!#(B
$B$b$A$m$s!"0l;~E*$K8+$($J$$$@$1$G!"%P%C%U%!Fb$K$OB8:_$7$F$$$^$9!#(B
$B@Z$j<N$F$F$$$k$3$H$r<($9$?$a$K!"(B
@samp{\}$B$G$O$J$/(B@samp{$}$B$r1&C<$KMQ$$$^$9!#(B
@c Truncation instead of continuation happens whenever horizontal
@c scrolling is in use, and optionally in all side-by-side windows
@c (@pxref{Windows}). You can enable truncation for a particular buffer by
@c setting the variable @code{truncate-lines} to non-@code{nil} in that
@c buffer. (@xref{Variables}.) Altering the value of
@c @code{truncate-lines} makes it local to the current buffer; until that
@c time, the default value is in effect. The default is initially
@c @code{nil}. @xref{Locals}.
$B?eJ?%9%/%m!<%k$r;H$C$F$$$?$j!"%&%#%s%I%&$r:81&$KJB$Y$F$$$k$H!"(B
$B7QB3$N$+$o$j$K@Z$j<N$FI=<($7$^$9!J(B@pxref{Windows}$B!K!#(B
$BFCDj$N%P%C%U%!$NJQ?t(B@code{truncate-lines}$B$K(B@code{nil}$B0J30$r@_Dj$9$k$H!"(B
$B$=$N%P%C%U%!$r@Z$j<N$FI=<($K$G$-$^$9!J(B@pxref{Variables}$B!K!#(B
$BJQ?t(B@code{truncate-lines}$B$NCM$rJQ99$9$k$H!"(B
$B$3$NJQ?t$O%+%l%s%H%P%C%U%!$K%m!<%+%k$K$J$j$^$9!#(B
$B$=$&$9$k$^$G$O!"%G%U%)%k%HCM$,;H$o$l$^$9!#(B
$B%G%U%)%k%H$N=i4|CM$O(B@code{nil}$B$G$9!#(B
@xref{Locals}$B!#(B
@c @xref{Display Vars}, for additional variables that affect how text is
@c displayed.
$B%F%-%9%H$NI=<(J}K!$K1F6A$9$kJQ?t$K$D$$$F$O!"(B@xref{Display Vars}$B!#(B
@node Position Info
@c @section Cursor Position Information
@section $B%+!<%=%k0LCV$N>pJs(B
@c Here are commands to get information about the size and position of
@c parts of the buffer, and to count lines.
$B%P%C%U%!$N$"$kItJ,$NBg$-$5$d0LCV$K4X$9$k>pJs$rF@$k%3%^%s%I$d(B
$B9T$r?t$($k%3%^%s%I$r>R2p$7$^$9!#(B
@table @kbd
@item M-x what-page
@c Print page number of point, and line number within page.
$B%]%$%s%H$,$"$k%Z!<%8$NHV9f$H$=$N%Z!<%8Fb$G$N9THV9f$rI=<($9$k!#(B
@item M-x what-line
@c Print line number of point in the buffer.
$B%]%$%s%H$,$"$k9T$N%P%C%U%!Fb$G$N9THV9f$rI=<($9$k!#(B
@item M-x line-number-mode
@c Toggle automatic display of current line number.
$B8=:_9T$N<+F09THV9fI=<($r%*%s!?%*%U$9$k!#(B
@item M-=
@c Print number of lines in the current region (@code{count-lines-region}).
@c @xref{Mark}, for information about the region.
$B%+%l%s%H%j!<%8%g%s$N9T?t$rI=<($9$k!J(B@code{count-lines-region}$B!K!#(B
$B%j!<%8%g%s$K4X$7$F$O!"(B@pxref{Mark}$B!#(B
@item C-x =
@c Print character code of character after point, character position of
@c point, and column of point (@code{what-cursor-position}).
$B%]%$%s%H$ND>8e$K$"$k0u;zJ8;z$NJ8;z%3!<%I!"%]%$%s%H$NJ8;z0LCV!"(B
$B%]%$%s%H$N7e0LCV$rI=<($9$k!J(B@code{what-cursor-position}$B!K!#(B
@end table
@findex what-page
@findex what-line
@c @cindex line number commands
@c @cindex location of point
@c @cindex cursor location
@c @cindex point location
@cindex $B9THV9f%3%^%s%I(B
@cindex $B%]%$%s%H0LCV(B
@cindex $B%+!<%=%k0LCV(B
@c There are two commands for working with line numbers. @kbd{M-x
@c what-line} computes the current line number and displays it in the echo
@c area. To go to a given line by number, use @kbd{M-x goto-line}; it
@c prompts you for the number. These line numbers count from one at the
@c beginning of the buffer.
$B9THV9f$K4X$9$k%3%^%s%I$O(B2$B$D$"$j$^$9!#(B
@kbd{M-x what-line}$B$O8=:_9T$N9THV9f$r7W;;$7$F!"%(%3!<NN0h$KI=<($7$^$9!#(B
$B;XDj$7$?9THV9f$N9T$X0\F0$9$k$K$O!"(B@kbd{M-x goto-line}$B$r;H$$$^$9!#(B
$B$3$N%3%^%s%I$O!"9THV9f$rJ9$$$F$-$^$9!#(B
$B$3$l$i$N9THV9f$O!"%P%C%U%!$N@hF,$r(B1$B9TL\$H?t$($^$9!#(B
@c You can also see the current line number in the mode line; @xref{Mode
@c Line}. If you narrow the buffer, then the line number in the mode line
@c is relative to the accessible portion (@pxref{Narrowing}). By contrast,
@c @code{what-line} shows both the line number relative to the narrowed
@c region and the line number relative to the whole buffer.
$B%b!<%I9T$G8=:_9T$N9THV9f$rCN$k$3$H$b$G$-$^$9!#(B
@xref{Mode Line}$B!#(B
$B%P%C%U%!$r%J%m%$%s%0$7$F$"$k>l9g!"(B
$B%b!<%I9TCf$N9THV9f$O;2>H2DG=$JHO0OFb$G$NAjBPE*$J$b$N$K$J$j$^$9(B
$B!J(B@pxref{Narrowing}$B!K!#(B
$BBP>HE*$K!"(B@code{what-line}$B$O!"(B
$B%J%m%$%s%0$5$l$?HO0OFb$G$N9THV9f$H!"(B
$B%P%C%U%!A4BN$G$N9THV9f$NN>J}$rI=<($7$^$9!#(B
@c By contrast, @kbd{M-x what-page} counts pages from the beginning of
@c the file, and counts lines within the page, printing both numbers.
@c @xref{Pages}.
$B$3$l$KBP$7!"(B@kbd{M-x what-page}$B$O!"%U%!%$%k$N@hF,$+$i%Z!<%8$r?t$(!"(B
$B$5$i$K%Z!<%8Fb$G$N9THV9f$b?t$($F!"N>J}$rI=<($7$^$9!#(B
@xref{Pages}$B!#(B
@kindex M-=
@findex count-lines-region
@c While on this subject, we might as well mention @kbd{M-=} (@code{count-lines-region}),
@c which prints the number of lines in the region (@pxref{Mark}).
@c @xref{Pages}, for the command @kbd{C-x l} which counts the lines in the
@c current page.
$B$3$NOCBj$K4XO"$7$F!"(B
@kbd{M-=}$B!J(B@code{count-lines-region}$B!K$b@bL@$7$F$*$-$^$7$g$&!#(B
$B$3$l$O!"%j!<%8%g%s$N9T?t$r?t$($FI=<($7$^$9!J(B@pxref{Mark}$B!K!#(B
$B%+%l%s%H%Z!<%8$N9T?t$r?t$($k%3%^%s%I(B@kbd{C-x l}$B$K$D$$$F$O!"(B@xref{Pages}$B!#(B
@kindex C-x =
@findex what-cursor-position
@c The command @kbd{C-x =} (@code{what-cursor-position}) can be used to find out
@c the column that the cursor is in, and other miscellaneous information about
@c point. It prints a line in the echo area that looks like this:
$B%3%^%s%I(B@kbd{C-x =}$B!J(B@code{what-cursor-position}$B!K$O!"(B
$B%+!<%=%k$,$"$k2U=j$N7e0LCV$r5a$a$?$j!"(B
$B%]%$%s%H$K4X$9$k$=$NB>$N<o!9$N>pJs$rF@$k$?$a$K;H$$$^$9!#(B
$B%(%3!<NN0h$K$D$.$N$h$&$KI=<($7$^$9!#(B
@smallexample
Char: c (0143, 99, 0x63) point=21044 of 26883(78%) column 53
@end smallexample
@noindent
@c (In fact, this is the output produced when point is before the
@c @samp{column} in the example.)
$B!J$3$l$O!"Nc$NCf$N(B@samp{column}$B$N$^$($K%]%$%s%H$,$"$k$H$-$N<B:]$N=PNO!#!K(B
@c The four values after @samp{Char:} describe the character that follows
@c point, first by showing it and then by giving its character code in
@c octal, decimal and hex. For a non-ASCII multibyte character, these are
@c followed by @samp{ext} and the character's representation, in hex, in
@c the buffer's coding system, if that coding system encodes the character
@c safely and with a single byte (@pxref{Coding Systems}). If the
@c character's encoding is longer than one byte, Emacs shows @samp{ext ...}.
@samp{Char:}$B$N$"$H$N(B4$B$D$NCM$O!"%]%$%s%H$ND>8e$NJ8;z$rI=$7$F$$$F!"(B
$BJ8;z$=$N$b$N!"B3$$$F!"J8;z%3!<%I$N(B8$B?JI=<(!"(B10$B?JI=<(!"(B16$B?JI=<($G$9!#(B
$BHs(BASCII$B$N%^%k%A%P%$%HJ8;z$KBP$7$F$O!"(B
$B%P%C%U%!$N%3!<%G%#%s%0%7%9%F%`$K$*$$$FEv3:J8;z$r$^$A$,$$$J$/!"$+$D!"(B
$BC10l%P%$%H$GId9f2=$G$-$k>l9g$K$O!"(B
@samp{ext}$B$H%P%C%U%!$N%3!<%G%#%s%0%7%9%F%`$GI=$7$?J8;z%3!<%I$N(B16$B?JI=<($,(B
$BB3$-$^$9!J(B@pxref{Coding Systems}$B!K!#(B
$BJ8;z$NId9f$,(B1$B%P%$%H$h$jD9$$>l9g$K$O!"(B
Emacs$B$O(B@samp{ext ...}$B$rI=<($7$^$9!#(B
@c @samp{point=} is followed by the position of point expressed as a character
@c count. The front of the buffer counts as position 1, one character later
@c as 2, and so on. The next, larger, number is the total number of characters
@c in the buffer. Afterward in parentheses comes the position expressed as a
@c percentage of the total size.
@samp{point=}$B$N$"$H$O!"%]%$%s%H0LCV$rJ8;zC10L$K?t$($?$b$N$G$9!#(B
$B%P%C%U%!$N@hF,$r0LCV(B1$B!"$D$.$N(B1$BJ8;z$r(B2$B!"$H$$$&$h$&$K?t$($^$9!#(B
$B$D$.$NBg$-$J?t;z$O%P%C%U%!Fb$NAmJ8;z?t$G$9!#(B
$BB3$/3g8L$NCf$O!"%]%$%s%H0LCV$NA4%5%$%:$KBP$9$kI4J,N($G$9!#(B
@c @samp{column} is followed by the horizontal position of point, in
@c columns from the left edge of the window.
@samp{column}$B$KB3$/$b$N$O!"%&%#%s%I%&$N:8C<$+$i$N7e?t$GI=$7$?(B
$B%]%$%s%H$N?eJ?0LCV$G$9!#(B
@c If the buffer has been narrowed, making some of the text at the
@c beginning and the end temporarily inaccessible, @kbd{C-x =} prints
@c additional text describing the currently accessible range. For example, it
@c might display this:
$B%P%C%U%!$r%J%m%$%s%0$7$F$$$F!"%P%C%U%!$N@hF,$HKvHx$N%F%-%9%H$N0lIt$,(B
$BI=<($5$l$F$$$J$$>l9g!"(B@kbd{C-x =}$B$O!"(B
$B8=:_;2>H2DG=$JHO0O$K4X$9$k>pJs$bI=<($7$^$9!#(B
$B$?$H$($P$D$.$N$h$&$K$J$j$^$9!#(B
@smallexample
Char: C (0103, 67, 0x43) point=252 of 889(28%) <231 - 599> column 0
@end smallexample
@noindent
@c where the two extra numbers give the smallest and largest character
@c position that point is allowed to assume. The characters between those
@c two positions are the accessible ones. @xref{Narrowing}.
$B$3$3$G!"?7$?$KDI2C$5$l$?(B2$B$D$N?t;z$,!"(B
$B%]%$%s%H$r@_Dj$G$-$kJ8;z0LCV$N2<8B$H>e8B$r<($7$^$9!#(B
$B$3$l$i(B2$B$D$N0LCV$N$"$$$@$NJ8;z$,;2>H2DG=$JJ8;z$G$9!#(B
@xref{Narrowing}$B!#(B
@c If point is at the end of the buffer (or the end of the accessible
@c part), the @w{@kbd{C-x =}} output does not describe a character after
@c point. The output might look like this:
$B%]%$%s%H$,%P%C%U%!$NKvHx!J$"$k$$$O;2>H2DG=$JItJ,$NKvHx!K$K$"$k>l9g!"(B
@w{@kbd{C-x =}}$B$O!"%]%$%s%H$ND>8e$NJ8;z$K4X$9$k>pJs$OI=<($7$^$;$s!#(B
$B=PNO$O$D$.$N$h$&$K$J$j$^$9!#(B
@smallexample
point=26957 of 26956(100%) column 0
@end smallexample
@c @w{@kbd{C-u C-x =}} displays additional information about a character,
@c in place of the buffer coordinates and column: the character set name
@c and the codes that identify the character within that character set;
@c ASCII characters are identified as belonging to the @code{ASCII}
@c character set. In addition, the full character encoding, even if it
@c takes more than a single byte, is shown after @samp{ext}. Here's an
@c example for a Latin-1 character A with a grave accent in a buffer whose
@c coding system is iso-2022-7bit@footnote{On terminals that support
@c Latin-1 characters, the character shown after @samp{Char:} is displayed
@c as the actual glyph of A with grave accent.}:
@w{@kbd{C-u C-x =}}$B$O!"%P%C%U%!Fb$N0LCV$H7e0LCV$N$+$o$j$K!"(B
$BJ8;z$K4X$9$kDI2C>pJs!"$D$^$j!"(B
$BJ8;z=89gL>$H$=$NJ8;z=89gFb$G$=$NJ8;z$r<1JL$9$k%3!<%I$rI=<($7$^$9!#(B
ASCII$BJ8;z$O!"J8;z=89g(B@code{ASCII}$B$KB0$9$k$b$N$H<1JL$7$^$9!#(B
$B$5$i$K!"J8;z$r40A4$KId9f2=$9$k$N$KC10l%P%$%H$h$jB?$/I,MW$J>l9g$G$"$C$F$b!"(B
@samp{ext}$B$N$"$H$KJ8;z%3!<%I$rI=<($7$^$9!#(B
$B%3!<%G%#%s%0%7%9%F%`$,(Biso-2022-7bit$B$G$"$k%P%C%U%!Fb$K$"$k(B
Latin-1$B$N%"%/%5%s%0%l!<%VIU$-$NJ8;z(BA$B$NNc$r<($7$^$9!#(B
@footnote{Latin-1$BJ8;z$rI=<($G$-$kC<Kv$G$"$l$P!"(B
@samp{Char:}$B$N$"$H$KI=<($5$l$kJ8;z$O!"<B:]$K!"(B
$B%"%/%5%s%0%l!<%VIU$-$NJ8;z(BA$B$K$J$k!#(B}
@example
Char: @`A (04300, 2240, 0x8c0, ext ESC , A @@) (latin-iso8859-1 64)
@end example
@node Arguments
@c @section Numeric Arguments
@section $B?t0z?t(B
@c @cindex numeric arguments
@c @cindex prefix arguments
@c @cindex arguments, numeric
@c @cindex arguments, prefix
@cindex $B?t0z?t(B
@cindex $BA0CV0z?t(B
@cindex $B0z?t!"?t;z(B
@cindex $B0z?t!"A0CV(B
@c In mathematics and computer usage, the word @dfn{argument} means
@c ``data provided to a function or operation.'' You can give any Emacs
@c command a @dfn{numeric argument} (also called a @dfn{prefix argument}).
@c Some commands interpret the argument as a repetition count. For
@c example, @kbd{C-f} with an argument of ten moves forward ten characters
@c instead of one. With these commands, no argument is equivalent to an
@c argument of one. Negative arguments tell most such commands to move or
@c act in the opposite direction.
$B?t3X$d7W;;5!$NMQ8l$G$O!"(B@dfn{$B0z?t(B}$B!J(Bargument$B!K$H$$$&C18l$O(B
$B!X4X?t$dA`:n$KM?$($k%G!<%?!Y$r0UL#$7$^$9!#(B
Emacs$B$N$9$Y$F$N%3%^%s%I$K$O!"(B@dfn{$B?t0z?t(B}$B!J(Bnumeric argument$B!K(B
$B!J(B@dfn{$BA0CV0z?t(B}$B!J(Bprefix argument$B!K$H$b8F$V!K$r;XDj$G$-$^$9!#(B
$B%3%^%s%I$K$h$C$F$O!"0z?t$rH?I|2s?t$H$7$F2r<a$7$^$9!#(B
$B$?$H$($P!"0z?t(B10$B$r(B@kbd{C-f}$B$K;XDj$9$k$H!"(B
$B%+!<%=%k$rDL>o$N(B1$BJ8;z$G$O$J$/!"(B10$BJ8;zJ,A08~$-$K0\F0$7$^$9!#(B
$B$3$l$i$N%3%^%s%I$G$O!"0z?t$r;XDj$7$J$$$H0z?t(B1$B$r;XDj$7$?$N$HF1Ey$K$J$j$^$9!#(B
$B$3$N<o$N%3%^%s%I$NB?$/$G$O!"Ii$N0z?t$r;XDj$9$k$H!"(B
$B5U8~$-$N0\F0$d5U$NA`:n$r;X<($9$k$3$H$K$J$j$^$9!#(B
@kindex M-1
@kindex M-@t{-}
@findex digit-argument
@findex negative-argument
@c If your terminal keyboard has a @key{META} key, the easiest way to
@c specify a numeric argument is to type digits and/or a minus sign while
@c holding down the @key{META} key. For example,
$BC<Kv$N%-!<%\!<%I$K(B@key{META}$B%-!<$,$"$k>l9g!"(B
$B?t0z?t$rF~NO$9$k$b$C$H$b4JC1$JJ}K!$O!"(B
@key{META}$B%-!<$r2!$72<$2$?$^$^$G!"?t;z$d%^%$%J%95-9f$rBG$A$^$9!#(B
$B$?$H$($P!"(B
@example
M-5 C-n
@end example
@noindent
@c would move down five lines. The characters @kbd{Meta-1}, @kbd{Meta-2},
@c and so on, as well as @kbd{Meta--}, do this because they are keys bound
@c to commands (@code{digit-argument} and @code{negative-argument}) that
@c are defined to contribute to an argument for the next command. Digits
@c and @kbd{-} modified with Control, or Control and Meta, also specify
@c numeric arguments.
$B$O!"%+!<%=%k$r(B5$B9T2<$K0\F0$7$^$9!#(B
@kbd{Meta-1}$B!"(B@kbd{Meta-2}$B!"(B@kbd{Meta--}$B$J$I$NJ8;z$,$3$N$h$&$KF0:n$9$k$N$O!"(B
$B$3$l$i$N%-!<$,!"8eB3$N%3%^%s%I$K0z?t$rM?$($k$h$&$KDj5A$5$l$?%3%^%s%I(B
$B!J(B@code{digit-argument}$B$H(B@code{negative-argument}$B!K$K(B
$B%P%$%s%I$5$l$F$$$k$+$i$G$9!#(B
$B%3%s%H%m!<%k$d%3%s%H%m!<%k$H%a%?$G=$>~$7$??t;z$H(B@kbd{-}$B$b!"(B
$BF1MM$K?t0z?t$r;XDj$7$^$9!#(B
@kindex C-u
@findex universal-argument
@c Another way of specifying an argument is to use the @kbd{C-u}
@c (@code{universal-argument}) command followed by the digits of the
@c argument. With @kbd{C-u}, you can type the argument digits without
@c holding down modifier keys; @kbd{C-u} works on all terminals. To type a
@c negative argument, type a minus sign after @kbd{C-u}. Just a minus sign
@c without digits normally means @minus{}1.
$B0z?t$r;XDj$9$kJL$NJ}K!$O!"(B
@kbd{C-u}$B!J(B@code{universal-argument}$B!K%3%^%s%I$KB3$1$F(B
$B0z?t$N?t;z$rF~NO$9$k$3$H$G$9!#(B
@kbd{C-u}$B$G$O!"=$>~%-!<$r2!$72<$2B3$1$k$3$H$J$/0z?t$N?t;z$rBG$F$^$9!#(B
@kbd{C-u}$B$O$9$Y$F$NC<Kv$G;H$($^$9!#(B
$BIi$N0z?t$r;XDj$9$k$K$O!"(B@kbd{C-u}$B$N$"$H$K$^$:%^%$%J%95-9f$rBG$A$^$9!#(B
$B%^%$%J%95-9f$@$1$@$H(B@minus{}1$B$r0UL#$7$^$9!#(B
@c @kbd{C-u} followed by a character which is neither a digit nor a minus
@c sign has the special meaning of ``multiply by four.'' It multiplies the
@c argument for the next command by four. @kbd{C-u} twice multiplies it by
@c sixteen. Thus, @kbd{C-u C-u C-f} moves forward sixteen characters. This
@c is a good way to move forward ``fast,'' since it moves about 1/5 of a line
@c in the usual size screen. Other useful combinations are @kbd{C-u C-n},
@c @kbd{C-u C-u C-n} (move down a good fraction of a screen), @kbd{C-u C-u
@c C-o} (make ``a lot'' of blank lines), and @kbd{C-u C-k} (kill four
@c lines).@refill
@kbd{C-u}$B$N$"$H$K?t;z$G$b%^%$%J%95-9f$G$b$J$$J8;z$rBG$D$H!"(B
$B!X(B4$BG\$9$k!Y$H$$$&FCJL$J0UL#$K$J$j$^$9!#(B
$B$D$^$j!"8eB3$N%3%^%s%I$KEO$90z?t$r(B4$BG\$7$^$9!#(B
@kbd{C-u}$B$r(B2$B2sBG$D$H!"0z?t$r(B16$BG\$7$^$9!#(B
$B$7$?$,$C$F!"(B@kbd{C-u C-u C-f}$B$O!"%+!<%=%k$rA08~$-$K(B16$BJ8;zJ,0\F0$7$^$9!#(B
16$BJ8;z$ODL>o$N2hLL$GLs(B1/5$B9T$KAjEv$9$k$N$G!"(B
$B%+!<%=%k$r!XB.$/!Y0\F0$5$;$?$$>l9g$KJXMx$JJ}K!$G$9!#(B
$BJXMx$JB>$NAH$_9g$;$O!"(B
@kbd{C-u C-n}$B$d(B@kbd{C-u C-u C-n}$B!J2hLL$N2<J}$X$N0\F0$KJXMx!K!"(B
@kbd{C-u C-u C-o}$B!J!X?tB?$/!Y$N6u9T$r:n$k!K!"(B
@kbd{C-u C-k}$B!J(B4$B9T%-%k$9$k!K$G$9!#(B
@c Some commands care only about whether there is an argument, and not about
@c its value. For example, the command @kbd{M-q} (@code{fill-paragraph}) with
@c no argument fills text; with an argument, it justifies the text as well.
@c (@xref{Filling}, for more information on @kbd{M-q}.) Plain @kbd{C-u} is a
@c handy way of providing an argument for such commands.
$B%3%^%s%I$K$h$C$F$O!"0z?t$NCM$G$O$J$/!"0z?t$NM-L5$@$1$rLdBj$K$7$^$9!#(B
$B$?$H$($P!"%3%^%s%I(B@kbd{M-q}$B!J(B@code{fill-paragraph}$B!K$K0z?t$r;XDj$7$J$$$H(B
$B%F%-%9%H$N5M$a9~$_$N$_$r9T$$$^$9!#(B
$B0z?t$r;XDj$9$k$H!"$5$i$KI}B7$($b9T$$$^$9!#(B
$B!J(B@kbd{M-q}$B$K4X$9$k>\:Y$O!"(B@pxref{Filling}$B!#!K(B
@kbd{C-u}$B$@$1$r;H$($P!"$3$N$h$&$J%3%^%s%I$K4JC1$K0z?t$r;XDj$G$-$^$9!#(B
@c Some commands use the value of the argument as a repeat count, but do
@c something peculiar when there is no argument. For example, the command
@c @kbd{C-k} (@code{kill-line}) with argument @var{n} kills @var{n} lines,
@c including their terminating newlines. But @kbd{C-k} with no argument is
@c special: it kills the text up to the next newline, or, if point is right at
@c the end of the line, it kills the newline itself. Thus, two @kbd{C-k}
@c commands with no arguments can kill a nonblank line, just like @kbd{C-k}
@c with an argument of one. (@xref{Killing}, for more information on
@c @kbd{C-k}.)@refill
$B0z?t$NCM$rH?I|2s?t$H$7$F;H$&$K$b4X$o$i$:!"(B
$B0z?t$,$J$$$HFCJL$JF0:n$r$9$k%3%^%s%I$b$"$j$^$9!#(B
$B$?$H$($P!"(B@kbd{C-k}$B!J(B@code{kill-line}$B!K$K0z?t(B@var{n}$B$r;XDj$9$k$H!"(B
$B9T6h@Z$j$N2~9T$b4^$a$F(B@var{n}$B9T$r%-%k$7$^$9!#(B
$B$3$l$KBP$7!"0z?t$r;XDj$7$J$$>l9g$OFCJL$JF0:n$H$J$j$^$9!#(B
$B$D$^$j!"$D$.$N2~9TJ8;z$^$G$N%F%-%9%H$r%-%k$9$k$+!"(B
$B9TKv$K%]%$%s%H$,$"$k>l9g$O2~9T$=$N$b$N$r%-%k$7$^$9!#(B
$B$7$?$,$C$F!"0z?t$r;XDj$;$:$K(B@kbd{C-k}$B$r(B2$B2s<B9T$9$k$H!"(B
$B0z?t(B1$B$r;XDj$7$?(B@kbd{C-k}$B$HF1MM$K!"6u9T$G$J$$(B1$B9T$r%-%k$7$^$9!#(B
$B!J(B@kbd{C-k}$B$N>\:Y$K$D$$$F$O!"(B@pxref{Killing}$B!#!K(B
@c A few commands treat a plain @kbd{C-u} differently from an ordinary
@c argument. A few others may treat an argument of just a minus sign
@c differently from an argument of @minus{}1. These unusual cases are
@c described when they come up; they are always for reasons of convenience
@c of use of the individual command.
$B$$$/$D$+$N%3%^%s%I$O!"(B@kbd{C-u}$B$@$1$N0z?t$rDL>o$N0z?t$H$O(B
$B0[$J$k$b$N$H$7$F07$$$^$9!#(B
$B$^$?!"%^%$%J%95-9f$N$_$N0z?t$r(B@minus{}1$B$H6hJL$9$k%3%^%s%I$b$"$j$^$9!#(B
$B$3$l$i$NNc30$K$D$$$F$O!"I,MW$K$J$C$?$H$-$K@bL@$7$^$9!#(B
$B$3$l$i$NNc30$O!"$=$l$>$l$N%3%^%s%I$r;H$$$d$9$/$9$k$?$a$K$"$j$^$9!#(B
@c You can use a numeric argument to insert multiple copies of a
@c character. This is straightforward unless the character is a digit; for
@c example, @kbd{C-u 6 4 a} inserts 64 copies of the character @samp{a}.
@c But this does not work for inserting digits; @kbd{C-u 6 4 1} specifies
@c an argument of 641, rather than inserting anything. To separate the
@c digit to insert from the argument, type another @kbd{C-u}; for example,
@c @kbd{C-u 6 4 C-u 1} does insert 64 copies of the character @samp{1}.
$B?t0z?t$r;H$C$F!"J8;z$N%3%T!<$rJ#?t8DA^F~$9$k$3$H$b$G$-$^$9!#(B
$B$3$NA`:n$O!"?t;z0J30$NJ8;z$J$i$P4JC1$G$9!#(B
$B$?$H$($P!"(B@kbd{C-u 6 4 a}$B$G!"J8;z(B@samp{a}$B$r(B64$B8DA^F~$G$-$^$9!#(B
$B$7$+$7!"?t;z$G$O5!G=$7$^$;$s!#(B
@kbd{C-u 6 4 1}$B$O!"0z?t$,(B641$B$G$"$k$3$H$r0UL#$7!"2?$bA^F~$7$^$;$s!#(B
$B0z?t$HA^F~$7$?$$?t;z$r6h@Z$k$K$O!"$b$&(B1$B$D(B@kbd{C-u}$B$rBG$A$^$9!#(B
$B$?$H$($P!"(B@kbd{C-u 6 4 C-u 1}$B$G!"?t;z(B@samp{1}$B$r(B64$B8DA^F~$G$-$^$9!#(B
@c We use the term ``prefix argument'' as well as ``numeric argument'' to
@c emphasize that you type the argument before the command, and to
@c distinguish these arguments from minibuffer arguments that come after
@c the command.
$B%3%^%s%I$N$^$($K0z?t$rBG$D$H$$$&$3$H$r6/D4$9$k$?$a$K!"$^$?!"(B
$B%3%^%s%I$N$"$H$N%_%K%P%C%U%!0z?t$H6hJL$9$k$?$a$K!"(B
$B!X?t0z?t!Y$HF1MM$KMQ8l!XA0CV0z?t!Y$r;H$$$^$9!#(B
@node Repeating
@c @section Repeating a Command
@section $B%3%^%s%I$r7+$jJV$9(B
@c @cindex repeating a command
@cindex $B%3%^%s%I$r7+$jJV$9(B
@kindex C-x z
@findex repeat
@c The command @kbd{C-x z} (@code{repeat}) provides another way to repeat
@c an Emacs command many times. This command repeats the previous Emacs
@c command, whatever that was. Repeating a command uses the same arguments
@c that were used before; it does not read new arguments each time.
$B%3%^%s%I(B@kbd{C-x z}$B!J(B@code{repeat}$B!K$O!"(B
Emacs$B%3%^%s%I$r2?2s$bH?I|$9$kJL$NJ}K!$G$9!#(B
$B$3$N%3%^%s%I$O!"D>A0$N(BEmacs$B%3%^%s%I$,2?$G$"$C$F$b!"$=$l$r7+$jJV$7$^$9!#(B
$B7+$jJV$5$l$k%3%^%s%I$O!"$^$($HF1$80z?t$r;H$$$^$9!#(B
$BKh2s!"?7$?$K0z?t$rFI$`$3$H$O$7$^$;$s!#(B
@c To repeat the command more than once, type additional @kbd{z}'s: each
@c @kbd{z} repeats the command one more time. Repetition ends when you
@c type a character other than @kbd{z}, or press a mouse button.
$B%3%^%s%I$r(B2$B2s0J>e7+$jJV$9$K$O!"(B@kbd{z}$B$rDI2C$7$FBG$A$^$9!#(B
1$B$D$N(B@kbd{z}$B$G!"%3%^%s%I$r(B1$B2s7+$jJV$7$^$9!#(B
@kbd{z}$B0J30$NJ8;z$rBG$D$+!"%^%&%9%\%?%s$r2!$9$H!"(B
$B7+$jJV$7$r=*N;$7$^$9!#(B
@c For example, suppose you type @kbd{C-u 2 0 C-d} to delete 20
@c characters. You can repeat that command (including its argument) three
@c additional times, to delete a total of 80 characters, by typing @kbd{C-x
@c z z z}. The first @kbd{C-x z} repeats the command once, and each
@c subsequent @kbd{z} repeats it once again.
$B$?$H$($P!"(B20$BJ8;z:o=|$9$k$?$a$K(B@kbd{C-u 2 0 C-d}$B$HBG$C$?$H$7$^$7$g$&!#(B
@kbd{C-x z z z}$B$HBG$F$P!"(B
$B!J0z?t$r4^$a$F!K:o=|%3%^%s%I$r$5$i$K(B3$B2s7+$jJV$7!"A4It$G(B80$BJ8;z:o=|$G$-$^$9!#(B
$B;O$a$N(B@kbd{C-x z}$B$G%3%^%s%I$r(B1$B2s7+$jJV$7!"(B
$B$=$N$"$H$N$=$l$>$l$N(B@kbd{z}$B$G(B1$B2s$:$D7+$jJV$7$^$9!#(B
|