@c This is part of the Emacs manual.
@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001,
-@c 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+@c 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+@c Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Basic, Minibuffer, Exiting, Top
@chapter Basic Editing Commands
* Inserting Text:: Inserting text by simply typing it.
* Moving Point:: Moving the cursor to the place where you want to
- change something.
-* Erasing:: Deleting and killing text.
-* Basic Undo:: Undoing recent changes in the text.
+ change something.
+* Erasing:: Deleting and killing text.
+* Basic 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:: Making and deleting blank lines.
+* Blank Lines:: Making and deleting blank lines.
* Continuation Lines:: How Emacs displays lines too wide for the screen.
* Position Info:: What page, line, row, or column is point on?
-* Arguments:: Numeric arguments for repeating a command N times.
+* Arguments:: Numeric arguments for repeating a command N times.
* Repeating:: Repeating the previous command quickly.
@end menu
For instance, @kbd{DEL} runs the command @code{delete-backward-char}
by default (some modes bind it to a different command); it does not
insert a literal @samp{DEL} character (@acronym{ASCII} character code
-127). To insert a non-graphic character, first @dfn{quote} it by
-typing @kbd{C-q} (@code{quoted-insert}). There are two ways to use
-@kbd{C-q}:
+127).
+
+ To insert a non-graphic character, or a character that your keyboard
+does not support, first @dfn{quote} it by typing @kbd{C-q}
+(@code{quoted-insert}). There are two ways to use @kbd{C-q}:
@itemize @bullet
@item
of overwriting with it.
@end itemize
-@cindex 8-bit character codes
-@noindent
-If you specify a code in the octal range 0200 through 0377, @kbd{C-q}
-assumes that you intend to use some ISO 8859-@var{n} character set,
-and converts the specified code to the corresponding Emacs character
-code. Your choice of language environment determines which of the ISO
-8859 character sets to use (@pxref{Language Environments}). This
-feature is disabled if multibyte characters are disabled
-(@pxref{Enabling Multibyte}).
-
@vindex read-quoted-char-radix
+@noindent
To use decimal or hexadecimal instead of octal, set the variable
-@code{read-quoted-char-radix} to 10 or 16. If the radix is greater than
-10, some letters starting with @kbd{a} serve as part of a character
-code, just like digits.
+@code{read-quoted-char-radix} to 10 or 16. If the radix is 16,
+the letters @kbd{a} to @kbd{f} serve as part of a character code,
+just like digits. Case is ignored.
-A numeric argument tells @kbd{C-q} how many copies of the quoted
+ A numeric argument tells @kbd{C-q} how many copies of the quoted
character to insert (@pxref{Arguments}).
-@findex newline
-@findex self-insert
- Customization information: @key{DEL} in most modes runs the command
-@code{delete-backward-char}; @key{RET} runs the command
-@code{newline}, and self-inserting printing characters run the command
-@code{self-insert}, which inserts whatever character you typed. Some
-major modes rebind @key{DEL} to other commands.
+@findex ucs-insert
+@kindex C-x 8 RET
+@cindex Unicode
+ Instead of @kbd{C-q}, you can use @kbd{C-x 8 @key{RET}}
+(@code{ucs-insert}) to insert a character based on its Unicode name or
+code-point. This command prompts for a character to insert, using
+the minibuffer; you can specify the character using either (i) the
+character's name in the Unicode standard, or (ii) the character's
+code-point in the Unicode standard. If you specify the character's
+name, the command provides completion.
@node Moving Point
@section Changing the Location of Point
@findex move-end-of-line
@findex forward-char
@findex backward-char
+@findex right-char
+@findex left-char
@findex next-line
@findex previous-line
@findex beginning-of-buffer
@itemx @key{End}
Move to the end of the line (@code{move-end-of-line}).
@item C-f
-@itemx @key{right}
Move forward one character (@code{forward-char}).
+@item @key{right}
+Move one character to the right (@code{right-char}). This
+moves one character forward in text that is read in the usual
+left-to-right direction, but one character @emph{backward} if the text
+is read right-to-left, as needed for right-to-left scripts such as
+Arabic. @xref{Bidirectional Editing}.
@item C-b
-@itemx @key{left}
Move backward one character (@code{backward-char}).
+@item @key{left}
+Move one character to the left (@code{left-char}). This
+moves one character backward in left-to-right text and one character
+forward in right-to-left text.
@item M-f
@itemx M-@key{right}
-@itemx C-@key{right}
Move forward one word (@code{forward-word}).
+@item C-@key{right}
+Move one word to the right (@code{right-word}). This moves one word
+forward in left-to-right text and one word backward in right-to-left
+text.
@item M-b
@itemx M-@key{left}
-@itemx C-@key{left}
Move backward one word (@code{backward-word}).
+@item C-@key{left}
+Move one word to the left (@code{left-word}). This moves one word
+backward in left-to-right text and one word forward in right-to-left
+text.
@item C-n
@itemx @key{down}
Move down one screen line (@code{next-line}). This command attempts
Move up one screen line (@code{previous-line}). This command
preserves position within the line, like @kbd{C-n}.
@item M-r
-Move point to left margin, vertically centered in the window
-(@code{move-to-window-line}). Text does not move on the screen.
+Without moving the text on the screen, reposition point on the left
+margin of the center-most text line of the window; on subsequent
+consecutive invocations, move point to the left margin of the top-most
+line, the bottom-most line, and so forth, in cyclic order
+(@code{move-to-window-line-top-bottom}).
+
A numeric argument says which screen line to place point on, counting
downward from the top of the window (zero means the top line). A
negative argument counts lines up from the bottom (@minus{}1 means the
bottom line).
+
@item M-<
Move to the top of the buffer (@code{beginning-of-buffer}). With
numeric argument @var{n}, move to @var{n}/10 of the way from the top.
Scroll one screen backward, and move point if necessary to put it on
the screen (@code{scroll-down}). If your keyboard has a @key{PageUp}
key (sometimes labelled @key{prior}), it does the same thing as
-@key{M-v}.
+@kbd{M-v}.
@item M-x goto-char
Read a number @var{n} and move point to buffer position @var{n}.
Position 1 is the beginning of the buffer.
Display the number of lines in the current region. Normally bound to
@kbd{M-=}, except in a few specialist modes. @xref{Mark}, for
information about the region.
+@item M-x count-words-region
+Display the number of words in the current region.
@item C-x =
Display the character code of character after point, character position of
point, and column of point (@code{what-cursor-position}).
z z z}. The first @kbd{C-x z} repeats the command once, and each
subsequent @kbd{z} repeats it once again.
-@ignore
- arch-tag: cda8952a-c439-41c1-aecf-4bc0d6482956
-@end ignore