@c This is part of the Emacs manual.
-@c Copyright (C) 1985, 86, 87, 93, 94, 95, 1997 Free Software Foundation, Inc.
+@c Copyright (C) 1985,86,87,93,94,95,1997,2001 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Mark, Killing, Help, Top
@chapter The Mark and the Region
Certain Emacs commands set the mark; other editing commands do not
affect it, so the mark remains where you set it last. Each Emacs
buffer has its own mark, and setting the mark in one buffer has no
-effect on other buffers' marks. When you return to a buffer that had
-been selected previously, its mark is at the same place as before.
+effect on other buffers' marks. When you return to a buffer that was
+current earlier, its mark is at the same place as before.
The ends of the region are always point and the mark. It doesn't
matter which of them was put in its current place first, or which one
Here are some commands for setting the mark:
-@c WideCommands
@table @kbd
@item C-@key{SPC}
Set the mark where point is (@code{set-mark-command}).
@kbd{C-x C-x} is also useful when you are satisfied with the position
of point but want to move the other end of the region (where the mark
is); do @kbd{C-x C-x} to put point at that end of the region, and then
-move it. A second use of @kbd{C-x C-x}, if necessary, puts the mark at
+move it. Using @kbd{C-x C-x} a second time, if necessary, puts the mark at
the new position with point back at its original position.
For more facilities that allow you to go to previously set marks, see
@itemize @bullet
@item
To set the mark, type @kbd{C-@key{SPC}} (@code{set-mark-command}).
-This makes the mark active; as you move point, you will see the region
-highlighting grow and shrink.
+This makes the mark active and thus begins highlighting of the region.
+As you move point, you will see the highlighted region grow and
+shrink.
@item
The mouse commands for specifying the mark also make it active. So do
region active again by typing @kbd{C-x C-x}.
@item
-Commands like @kbd{M->} and @kbd{C-s} that ``leave the mark behind'' in
-addition to some other primary purpose do not activate the new mark.
+Commands like @kbd{M->} and @kbd{C-s}, that ``leave the mark behind'' in
+addition to some other primary purpose, do not activate the new mark.
You can activate the new region by executing @kbd{C-x C-x}
(@code{exchange-point-and-mark}).
in their own documentation.
@end itemize
- Highlighting of the region uses the @code{region} face; you can
-customize how the region is highlighted by changing this face.
-@xref{Face Customization}.
+ The highlighting of the region uses the @code{region} face; you can
+customize the appearance of the highlighted region by changing this
+face. @xref{Face Customization}.
@vindex highlight-nonselected-windows
When multiple windows show the same buffer, they can have different
window highlights its region (@pxref{Windows}). However, if the
variable @code{highlight-nonselected-windows} is non-@code{nil}, then
each window highlights its own region (provided that Transient Mark mode
-is enabled and the window's buffer's mark is active).
+is enabled and the mark in the window's buffer is active).
When Transient Mark mode is not enabled, every command that sets the
mark also activates it, and nothing ever deactivates it.
Evaluate it as Lisp code with @kbd{M-x eval-region} (@pxref{Lisp Eval}).
@end itemize
- Most commands that operate on the text in the
-region have the word @code{region} in their names.
+ Most commands that operate on the text in the region have the word
+@code{region} in their names.
@node Marking Objects
@section Commands to Mark Textual Objects
@item C-M-h
Put region around current defun (@code{mark-defun}).
@item C-x h
-Put region around entire buffer (@code{mark-whole-buffer}).
+Put region around the entire buffer (@code{mark-whole-buffer}).
@item C-x C-p
Put region around current page (@code{mark-page}).
@end table
@kbd{M-@@} (@code{mark-word}) puts the mark at the end of the next
word, while @kbd{C-M-@@} (@code{mark-sexp}) puts it at the end of the
next balanced expression (@pxref{Expressions}). These commands handle
-arguments just like @kbd{M-f} and @kbd{C-M-f}.
+arguments just like @kbd{M-f} and @kbd{C-M-f}. If you repeat these
+commands, the region is extended. For example, you can type either
+@kbd{C-u 2 M-@@} or @kbd{M-@@ M-@@} to mark the next two words.
@kindex C-x h
@findex mark-whole-buffer
Other commands set both point and mark, to delimit an object in the
buffer. For example, @kbd{M-h} (@code{mark-paragraph}) moves point to
-the beginning of the paragraph that surrounds or follows point, and puts
-the mark at the end of that paragraph (@pxref{Paragraphs}). It prepares
-the region so you can indent, case-convert, or kill a whole paragraph.
-
- @kbd{C-M-h} (@code{mark-defun}) similarly puts point before and the
-mark after the current or following major top-level definition, or
-defun (@pxref{Moving by Defuns}). @kbd{C-x C-p} (@code{mark-page})
-puts point before the current page, and mark at the end
-(@pxref{Pages}). The mark goes after the terminating page delimiter
-(to include it), while point goes after the preceding page delimiter
-(to exclude it). A numeric argument specifies a later page (if
-positive) or an earlier page (if negative) instead of the current
-page.
+the beginning of the paragraph that surrounds or follows point, and
+puts the mark at the end of that paragraph (@pxref{Paragraphs}). It
+prepares the region so you can indent, case-convert, or kill a whole
+paragraph. With prefix argument, if the argument's value is positive,
+@kbd{M-h} marks that many paragraphs starting with the one surrounding
+point. If the prefix argument is @minus{}@var{n}, @kbd{M-h} also
+marks @var{n} paragraphs, running back form the one surrounding point.
+In that last case, point moves forward to the end of that paragraph,
+and the mark goes at the start of the region. The @kbd{M-h} command
+also supports the extension of the region, similar to @kbd{M-@@} and
+@kbd{C-M-@@}.
+
+ @kbd{C-M-h} (@code{mark-defun}) similarly puts point before, and the
+mark after, the current (or following) major top-level definition, or
+defun (@pxref{Moving by Defuns}). (Currently it only marks one defun,
+but repeating it marks more defuns, like for @kbd{M-@@}.) @kbd{C-x
+C-p} (@code{mark-page}) puts point before the current page, and mark
+at the end (@pxref{Pages}). The mark goes after the terminating page
+delimiter (to include it in the region), while point goes after the
+preceding page delimiter (to exclude it). A numeric argument
+specifies a later page (if positive) or an earlier page (if negative)
+instead of the current page.
Finally, @kbd{C-x h} (@code{mark-whole-buffer}) sets up the entire
buffer as the region, by putting point at the beginning and the mark at
@vindex mark-ring-max
The variable @code{mark-ring-max} specifies the maximum number of
entries to keep in the mark ring. If that many entries exist and
-another one is pushed, the last one in the list is discarded. Repeating
+another one is pushed, the earliest one in the list is discarded. Repeating
@kbd{C-u C-@key{SPC}} cycles through the positions currently in the
ring.