]> code.delx.au - gnu-emacs/blobdiff - doc/emacs/basic.texi
* basic.texi (Moving Point): Fix tag.
[gnu-emacs] / doc / emacs / basic.texi
index b59831115717a63b7fde9901cc217db31773287b..4973b4a96d045a9074c6e0539e6c562d21b340d0 100644 (file)
@@ -1,6 +1,6 @@
 @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 Free Software Foundation, Inc.
+@c   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
 @node Basic, Minibuffer, Exiting, Top
 @chapter Basic Editing Commands
@@ -64,9 +64,11 @@ key; other keys act as editing commands and do not insert themselves.
 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
@@ -87,32 +89,24 @@ Overwrite mode, to give you a convenient way to insert a digit instead
 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 greater
+than 10, some letters starting with @kbd{a} serve as part of a
+character code, just like digits.
 
-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
+@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 commands 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.
 
 @node Moving Point
 @section Changing the Location of Point
@@ -202,28 +196,31 @@ numeric argument @var{n}, move to @var{n}/10 of the way from the top.
 Move to the end of the buffer (@code{end-of-buffer}).
 @item C-v
 @itemx @key{PageDown}
-@itemx @key{PRIOR}
+@itemx @key{next}
 Scroll the display one screen forward, and move point if necessary to
 put it on the screen (@code{scroll-up}).  If your keyboard has a
-@key{PageDown} key (sometimes labelled @key{PRIOR}), it does the same
-thing as as @key{C-v}.  Scrolling commands are described further in
+@key{PageDown} key (sometimes labelled @key{next}), it does the same
+thing as @key{C-v}.  Scrolling commands are described further in
 @ref{Scrolling}.
 @item M-v
 @itemx @key{PageUp}
-@itemx @key{NEXT}
+@itemx @key{prior}
 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{NEXT}), it does the same thing as
-@key{M-v}.
+key (sometimes labelled @key{prior}), it does the same thing as
+@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.
 @item M-g M-g
 @itemx M-g g
 Read a number @var{n} and move point to the beginning of line number
-@var{n} (@code{goto-line}).  Line 1 is the beginning of the buffer.
-If point is on or just after a number in the buffer, and you type
-@key{RET} with the minibuffer empty, that number is used for @var{n}.
+@var{n} (@code{goto-line}).  Line 1 is the beginning of the buffer.  If
+point is on or just after a number in the buffer, that is the default
+for @var{n}.  Just type @key{RET} in the minibuffer to use it.  You can
+also specify @var{n} by giving @kbd{M-g M-g} a numeric prefix argument.
+@xref{Select Buffer}, for the behavior of @kbd{M-g M-g} when you give it
+a plain prefix argument.
 @item C-x C-n
 @findex set-goal-column
 @kindex C-x C-n
@@ -512,9 +509,10 @@ Display the line number of point in the whole buffer.
 @itemx M-x column-number-mode
 Toggle automatic display of the current line number or column number.
 @xref{Optional Mode Line}.
-@item M-=
-Display the number of lines in the current region (@code{count-lines-region}).
-@xref{Mark}, for information about the region.
+@item M-x count-lines-region
+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 C-x =
 Display the character code of character after point, character position of
 point, and column of point (@code{what-cursor-position}).
@@ -535,7 +533,7 @@ Toggle automatic display of the size of the buffer.
   @kbd{M-x what-line} displays the current line number in the echo
 area.  This command is usually redundant, because the current line
 number is shown in the mode line (@pxref{Mode Line}).  However, if you
-narrow the buffer, the mode line shows the the line number relative to
+narrow the buffer, the mode line shows the line number relative to
 the accessible portion (@pxref{Narrowing}).  By contrast,
 @code{what-line} displays both the line number relative to the
 narrowed region and the line number relative to the whole buffer.
@@ -546,9 +544,9 @@ counts lines within the page, showing both numbers in the echo area.
 
 @kindex M-=
 @findex count-lines-region
-  Use @kbd{M-=} (@code{count-lines-region}) to display 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.
+  Use @kbd{M-x count-lines-region} (normally bound to @kbd{M-=}) to
+display 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.
 
 @kindex C-x =
 @findex what-cursor-position
@@ -607,7 +605,7 @@ direction.
 @kindex M-@t{-}
 @findex digit-argument
 @findex negative-argument
-  The easiest way to specify a numeric argument is to type digits
+  The easiest way to specify a numeric argument is to type a digit
 and/or a minus sign while holding down the @key{META} key.  For
 example,
 
@@ -621,13 +619,32 @@ well as @kbd{M--}, are bound to commands (@code{digit-argument} and
 @code{negative-argument}) that set up an argument for the next
 command.  @kbd{Meta--} without digits normally means @minus{}1.
 
+If you enter more than one digit, you need not hold down the
+@key{META} key for the second and subsequent digits.  Thus, to move
+down fifty lines, type
+
+@example
+M-5 0 C-n
+@end example
+
+@noindent
+Note that this @emph{does not} insert five copies of @samp{0} and move
+down one line, as you might expect---the @samp{0} is treated as part
+of the prefix argument.
+
+(What if you do want to insert five copies of @samp{0}?  Type @kbd{M-5
+C-u 0}.  Here, @kbd{C-u} ``terminates'' the prefix argument, so that
+the next keystroke begins the command that you want to execute.  Note
+that this meaning of @kbd{C-u} applies only to this case.  For the
+usual role of @kbd{C-u}, see below.)
+
 @kindex C-u
 @findex universal-argument
-  You can also specify a numeric argument by typing @kbd{C-u}
-(@code{universal-argument}) followed by the digits.  The advantage of
-@kbd{C-u} is that you can type the digits without holding down the
-@key{META} key.  For a negative argument, type a minus sign after
-@kbd{C-u}.  A minus sign without digits normally means @minus{}1.
+  Instead of typing @kbd{M-1}, @kbd{M-2}, and so on, another way to
+specify a numeric argument is to type @kbd{C-u}
+(@code{universal-argument}) followed by some digits, or (for a
+negative argument) a minus sign followed by digits.  A minus sign
+without digits normally means @minus{}1.
 
   @kbd{C-u} alone has the special meaning of ``four times'': it
 multiplies the argument for the next command by four.  @kbd{C-u C-u}