@c This is part of the Emacs manual.
-@c Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 2000 Free Software Foundation, Inc.
+@c Copyright (C) 1985,86,87,93,94,95,97,2000,2001 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Basic, Minibuffer, Exiting, Top
@chapter Basic Editing Commands
labeled @key{DEL}, @key{BACKSPACE} or @key{DELETE} which is a short
distance above the @key{RET} or @key{ENTER} key. This is the key you
normally use, outside Emacs, for erasing the last character that you
-typed. Regardless of the label on that key, Emacs always thinks of it
-as @key{DEL}, and that's what we call it in this manual.
+typed. Regardless of the label on that key, Emacs thinks of it as
+@key{DEL}, and that's what we call it in this manual.
The @key{DEL} key deletes the character @emph{before} the cursor.
As a consequence, the cursor and all the characters after it move
with text-only terminals, you will need to tell Emacs which key to use
for that purpose. If the large key not far above the @key{RET} or
@key{ENTER} key doesn't delete backwards, you need to do this.
-@xref{DEL Gets Help}, for an explanation of how.
+@xref{DEL Does Not Delete}, for an explanation of how.
- Many keyboards have both a @key{BACKSPACE} key a short ways above
-@key{RET} or @key{ENTER}, and a @key{DELETE} key elsewhere. In that
-case, the @key{BACKSPACE} key is @key{DEL}, and the @key{DELETE} key
-does something else---it deletes ``forwards,'' deleting the character
-after point, the one underneath the cursor, like @kbd{C-d} (see
-below).
+ Most PC keyboards have both a @key{BACKSPACE} key a short ways above
+@key{RET} or @key{ENTER}, and a @key{DELETE} key elsewhere. On these
+keyboards, Emacs supports when possible the usual convention that the
+@key{BACKSPACE} key deletes backwards (it is @key{DEL}), while the
+@key{DELETE} key deletes ``forwards,'' deleting the character after
+point, the one underneath the cursor, like @kbd{C-d} (see below).
@kindex RET
@cindex newline
@item
@kbd{C-q} followed by a sequence of octal digits inserts the character
with the specified octal character code. You can use any number of
-octal digits; any non-digit terminates the sequence. If the terminating
-character is @key{RET}, it serves only to terminate the sequence; any
-other non-digit is itself used as input after terminating the sequence.
-(The use of octal sequences is disabled in ordinary non-binary Overwrite
-mode, to give you a convenient way to insert a digit instead of
-overwriting with it.)
+octal digits; any non-digit terminates the sequence. If the
+terminating character is @key{RET}, it serves only to terminate the
+sequence. Any other non-digit terminates the sequence and then acts
+as normal input---thus, @kbd{C-q 1 0 1 B} inserts @samp{AB}.
+
+The use of octal sequences is disabled in ordinary non-binary
+Overwrite mode, to give you a convenient way to insert a digit instead
+of overwriting with it.
@end itemize
@cindex 8-bit character codes
@vindex track-eol
If you set the variable @code{track-eol} to a non-@code{nil} value,
-then @kbd{C-n} and @kbd{C-p} when at the end of the starting line move
+then @kbd{C-n} and @kbd{C-p}, when starting at the end of the line, move
to the end of another line. Normally, @code{track-eol} is @code{nil}.
@xref{Variables}, for how to set variables such as @code{track-eol}.
Consecutive repetitions of @kbd{C-_} or @kbd{C-x u} undo earlier and
earlier changes, back to the limit of the undo information available.
If all recorded changes have already been undone, the undo command
-prints an error message and does nothing.
+displays an error message and does nothing.
Any command other than an undo command breaks the sequence of undo
commands. Starting from that moment, the previous undo commands become
Here are special commands and techniques for putting in and taking out
blank lines.
-@c widecommands
@table @kbd
@item C-o
Insert one or more blank lines after the cursor (@code{open-line}).
Display the character code of character after point, character position of
point, and column of point (@code{what-cursor-position}).
@item M-x hl-line-mode
-Enable or disable highlighting of the current line.
+Enable or disable highlighting of the current line. @xref{Cursor
+Display}.
@end table
@findex what-page
prompts you for the number. These line numbers count from one at the
beginning of the buffer.
- You can also see the current line number in the mode line; @xref{Mode
+ You can also see the current line number in the mode line; see @ref{Mode
Line}. If you narrow the buffer, then the line number in the mode line
is relative to the accessible portion (@pxref{Narrowing}). By contrast,
@code{what-line} shows both the line number relative to the narrowed
region and the line number relative to the whole buffer.
- By contrast, @kbd{M-x what-page} counts pages from the beginning of
-the file, and counts lines within the page, printing both numbers.
+ @kbd{M-x what-page} counts pages from the beginning of the file, and
+counts lines within the page, showing both numbers in the echo area.
@xref{Pages}.
@kindex M-=
@findex count-lines-region
While on this subject, we might as well mention @kbd{M-=} (@code{count-lines-region}),
-which prints the number of lines in the region (@pxref{Mark}).
+which displays the number of lines in the region (@pxref{Mark}).
@xref{Pages}, for the command @kbd{C-x l} which counts the lines in the
current page.
@findex what-cursor-position
The command @kbd{C-x =} (@code{what-cursor-position}) can be used to find out
the column that the cursor is in, and other miscellaneous information about
-point. It prints a line in the echo area that looks like this:
+point. It displays a line in the echo area that looks like this:
@smallexample
Char: c (0143, 99, 0x63) point=21044 of 26883(78%) column 53
columns from the left edge of the window.
If the buffer has been narrowed, making some of the text at the
-beginning and the end temporarily inaccessible, @kbd{C-x =} prints
+beginning and the end temporarily inaccessible, @kbd{C-x =} displays
additional text describing the currently accessible range. For example, it
might display this:
Latin-1 characters, the character shown after @samp{Char:} is displayed
as the actual glyph of A with grave accent.}:
-@example
+@smallexample
Char: @`A (04300, 2240, 0x8c0, ext ESC , A @@) (latin-iso8859-1 64)
-@end example
+@end smallexample
@node Arguments
@section Numeric Arguments
If your terminal keyboard has a @key{META} key, the easiest way to
specify a numeric argument is to type digits and/or a minus sign while
holding down the @key{META} key. For example,
+
@example
M-5 C-n
@end example
+
@noindent
would move down five lines. The characters @kbd{Meta-1}, @kbd{Meta-2},
and so on, as well as @kbd{Meta--}, do this because they are keys bound
to commands (@code{digit-argument} and @code{negative-argument}) that
-are defined to contribute to an argument for the next command. Digits
-and @kbd{-} modified with Control, or Control and Meta, also specify
-numeric arguments.
+are defined to contribute to an argument for the next command.
+@kbd{Meta--} without digits normally means @minus{}1. Digits and
+@kbd{-} modified with Control, or Control and Meta, also specify numeric
+arguments.
@kindex C-u
@findex universal-argument
@section Repeating a Command
@cindex repeating a command
+ Many simple commands, such as those invoked with a single key or
+with @kbd{M-x @var{command-name} @key{RET}}, can be repeated by
+invoking them with a numeric argument that serves as a repeat count
+(@pxref{Arguments}). However, if the command you want to repeat
+prompts for some input, or uses a numeric argument in another way,
+repetition using a numeric argument might be problematical.
+
@kindex C-x z
@findex repeat
The command @kbd{C-x z} (@code{repeat}) provides another way to repeat