[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/doc/emacs/mark.texi,v
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/doc/emacs/mark.texi,v |
Date: |
Fri, 28 Mar 2008 19:02:43 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 08/03/28 19:02:43
Index: mark.texi
===================================================================
RCS file: /sources/emacs/emacs/doc/emacs/mark.texi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- mark.texi 22 Jan 2008 23:53:35 -0000 1.2
+++ mark.texi 28 Mar 2008 19:02:43 -0000 1.3
@@ -12,39 +12,40 @@
current buffer. To specify the text for such a command to operate on,
you set @dfn{the mark} at one end of it, and move point to the other
end. The text between point and the mark is called @dfn{the region}.
-Emacs highlights the region whenever there is one, if you enable
-Transient Mark mode (@pxref{Transient Mark}).
- 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 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
-comes earlier in the text---the region starts from point or the mark
-(whichever comes first), and ends at point or the mark (whichever
-comes last). Every time you move point, or set the mark in a new
-place, the region changes.
-
- Many commands that insert text, such as @kbd{C-y} (@code{yank}) and
address@hidden insert-buffer}, position point and the mark at opposite ends
-of the inserted text, so that the region consists of the text just
-inserted.
+ The region always extends between point and the mark, no matter
+which one comes earlier in the text---the region starts from point or
+the mark (whichever comes first), and ends at point or the mark
+(whichever comes last). Every time you move point, the region
+changes. When a region is active, Emacs highlights it using the
address@hidden face. You can customize the appearance of the
+highlighting by changing this face (@pxref{Face Customization}).
+
+ The region persists only until you use it. The mark is
+automatically @dfn{deactivated} after certain non-motion commands,
+including any command that changes the text in the buffer. You can
+also explicitly deactivate the mark at any time, by typing @kbd{C-g}
+(@pxref{Quitting}).
- Aside from delimiting the region, the mark is also useful for
-remembering a spot that you may want to go back to. To make this
-feature more useful, each buffer remembers 16 previous locations of the
-mark in the @dfn{mark ring}.
address@hidden highlight-nonselected-windows
+ 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 with an active mark, the mark is at the same place as before.
+When multiple windows show the same buffer, they can have different
+values of point, and thus different regions (though they all share one
+common mark position). @xref{Windows}. Ordinarily, only the selected
+window highlights its region, if a region exists; however, if the
+variable @code{highlight-nonselected-windows} is address@hidden, each
+window highlights its own region.
+
+ If Delete Selection mode is enabled, some commands delete the region
+when used while the mark is active. @xref{Mouse Commands}.
@menu
* Setting Mark:: Commands to set the mark.
-* Transient Mark:: How to make Emacs highlight the region--
- when there is one.
-* Momentary Mark:: Enabling Transient Mark mode momentarily.
-* Using Region:: Summary of ways to operate on contents of the region.
* Marking Objects:: Commands to put region around textual units.
+* Using Region:: Summary of ways to operate on contents of the region.
+* Persistent Mark:: Keeping the mark active all the time.
* Mark Ring:: Previous mark positions saved so you can go back there.
* Global Mark Ring:: Previous mark positions in various buffers.
@end menu
@@ -60,7 +61,8 @@
@item C-@@
The same.
@item C-x C-x
-Interchange mark and point (@code{exchange-point-and-mark}).
+Set the mark where point was, and move point where the mark was
+(@code{exchange-point-and-mark}).
@item Drag-Mouse-1
Set point and the mark around the text you drag across.
@item Mouse-3
@@ -68,252 +70,65 @@
(@code{mouse-save-then-kill}).
@end table
- For example, suppose you wish to convert part of the buffer to
-upper case, using the @kbd{C-x C-u} (@code{upcase-region}) command,
-which operates on the text in the region. You can first go to the
-beginning of the text to be capitalized, type @address@hidden to put
-the mark there, move to the end, and then type @kbd{C-x C-u}. Or, you
-can set the mark at the end of the text, move to the beginning, and then
-type @kbd{C-x C-u}.
-
@kindex C-SPC
@findex set-mark-command
- The most common way to set the mark is with the @address@hidden command
-(@code{set-mark-command}). This sets the mark where point is. Then you
-can move point away, leaving the mark behind.
-
- There are two ways to set the mark with the mouse. You can drag mouse
-button one across a range of text; that puts point where you release the
-mouse button, and sets the mark at the other end of that range. Or you
-can click mouse button three, which sets the mark at point (like
address@hidden@key{SPC}}) and then moves point where you clicked (like
address@hidden).
-
- Using the mouse to mark a region copies the region into the kill
-ring in addition to setting the mark; that gives behavior consistent
-with other window-driven applications. If you don't want to modify
-the kill ring, you must use keyboard commands to set the mark.
address@hidden Commands}.
+ The most common way to set the mark is with @address@hidden
+(@code{set-mark-command}). This sets the mark where point is. You
+can then move point away, leaving the mark behind.
+
+ For example, suppose you wish to convert part of the buffer to upper
+case. To accomplish this, first go to the beginning of the text to be
+capitalized, type @address@hidden, and move point until the desired
+portion of text is highlighted. You can now type @kbd{C-x C-u}
+(@code{upcase-region}), which converts the text in the region to upper
+case. This also automatically deactivates the mark. (Alternatively,
+you could set the mark at the end, move to the beginning, and do
address@hidden C-u}.)
@kindex C-x C-x
@findex exchange-point-and-mark
- When Emacs was developed, terminals had only one cursor, so Emacs
-does not show where the mark is located--you have to remember. If you
-enable Transient Mark mode (see below), then the region is highlighted
-when it is active; you can tell mark is at the other end of the
-highlighted region. But this only applies when the mark is active.
-
- The usual solution to this problem is to set the mark and then use
-it soon, before you forget where it is. Alternatively, you can see
-where the mark is with the command @kbd{C-x C-x}
-(@code{exchange-point-and-mark}) which puts the mark where point was
-and point where the mark was. The extent of the region is unchanged,
-but the cursor and point are now at the previous position of the mark.
-In Transient Mark mode, this command also reactivates the mark.
-
- @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. 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
address@hidden Ring}.
+ The command @kbd{C-x C-x} (@code{exchange-point-and-mark}) puts the
+mark where point was and moves point where the mark was, keeping the
+region unchanged. If no mark is active, Emacs reactivates the mark at
+the position where it was last set. @kbd{C-x C-x} is 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. 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.
+
+ You can also set the mark with the mouse. In fact, there are two
+ways to do this. You can press the left mouse button
+(@kbd{down-mouse-1}) and drag the mouse across a range of text while
+holding down the button; this sets the mark where you first pressed
+the mouse button, and point where you release it. Alternatively, you
+can click the right mouse button (@kbd{mouse-3}), which sets the mark
+at point and then moves point to where you clicked.
+
+ Using the mouse to mark a region also copies the region into the
+kill ring (@pxref{Kill Ring}). If you don't want to modify the kill
+ring, you must use keyboard commands to set the mark. @xref{Mouse
+Commands}.
@kindex C-@@
There is no such character as @address@hidden in @acronym{ASCII};
when you type @key{SPC} while holding down @key{CTRL} on a text
terminal, what you get is the character @kbd{C-@@}. This key is also
-bound to @code{set-mark-command}--so unless you are unlucky enough to
+bound to @code{set-mark-command}---so unless you are unlucky enough to
have a text terminal where typing @address@hidden does not produce
@kbd{C-@@}, you might as well think of this character as
@address@hidden
address@hidden Transient Mark
address@hidden Transient Mark Mode
address@hidden mode, Transient Mark
address@hidden Transient Mark mode
address@hidden highlighting region
address@hidden region highlighting
-
- On a terminal that supports colors, Emacs has the ability to
-highlight the current region. But normally it does not. Why not?
-
- In the normal mode of use, every command that sets the mark also
-activates it, and nothing ever deactivates it. Thus, once you have
-set the mark in a buffer, there is @emph{always} a region in that
-buffer. Highlighting the region all the time would be a nuisance. So
-normally Emacs highlights the region only immediately after you have
-selected one with the mouse.
-
- If you want region highlighting, you can use Transient Mark mode.
-This is a more rigid mode of operation in which the region ``lasts''
-only until you use it; operating on the region text deactivates the
-mark, so there is no region any more. Therefore, you must explicitly
-set up a region for each command that uses one.
-
- When Transient Mark mode is enabled, Emacs highlights the region,
-whenever there is a region. In Transient Mark mode, most of the time
-there is no region; therefore, highlighting the region when it exists
-is useful and not annoying.
-
address@hidden transient-mark-mode
- To enable Transient Mark mode, type @kbd{M-x transient-mark-mode}.
-This command toggles the mode; you can use the same command to turn
-the mode off again.
-
- Here are the details of Transient Mark mode:
-
address@hidden @bullet
address@hidden
-To set the mark, type @address@hidden (@code{set-mark-command}).
-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.
-
address@hidden
-The mouse commands for specifying the mark also make it active. So do
-keyboard commands whose purpose is to specify a region, including
address@hidden@@}, @kbd{C-M-@@}, @kbd{M-h}, @kbd{C-M-h}, @kbd{C-x C-p}, and
address@hidden h}.
-
address@hidden
-You can tell that the mark is active because the region is highlighted.
-
address@hidden
-When the mark is active, you can execute commands that operate on the
-region, such as killing, indenting, or writing to a file.
-
address@hidden
-Any change to the buffer, such as inserting or deleting a character,
-deactivates the mark. This means any subsequent command that operates
-on a region will get an error and refuse to operate. You can make the
-region active again by typing @kbd{C-x C-x}.
-
address@hidden
-If Delete Selection mode is also enabled, some commands delete the
-region when used while the mark is active. @xref{Mouse Commands}.
-
address@hidden
-Quitting with @kbd{C-g} deactivates the mark.
-
address@hidden
-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}).
-
address@hidden
-Commands that normally set the mark before moving long distances (like
address@hidden<} and @kbd{C-s}) do not alter the mark in Transient Mark mode
-when the mark is active.
-
address@hidden
-Some commands operate on the region if a region is active. For
-instance, @kbd{C-x u} in Transient Mark mode operates on the region,
-when there is a region. (Outside Transient Mark mode, you must type
address@hidden C-x u} if you want it to operate on the region.)
address@hidden Other commands that act this way are identified in their
-own documentation.
address@hidden itemize
-
- 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}.
-
address@hidden highlight-nonselected-windows
- When multiple windows show the same buffer, they can have different
-regions, because they can have different values of point (though they
-all share one common mark position). Ordinarily, only the selected
-window highlights its region (@pxref{Windows}). However, if the
-variable @code{highlight-nonselected-windows} is address@hidden, then
-each window highlights its own region (provided that Transient Mark mode
-is enabled and the mark in the window's buffer is active).
-
address@hidden mark-even-if-inactive
- If the variable @code{mark-even-if-inactive} is address@hidden in
-Transient Mark mode, then commands can use the mark and the region
-even when it is inactive. Region highlighting appears and disappears
-just as it normally does in Transient Mark mode, but the mark doesn't
-really go away when the highlighting disappears, so you can still use
-region commands.
-
address@hidden Zmacs mode
- Transient Mark mode is also sometimes known as ``Zmacs mode''
-because the Zmacs editor on the MIT Lisp Machine handled the mark in a
-similar way.
-
address@hidden Momentary Mark
address@hidden Using Transient Mark Mode Momentarily
-
- If you don't like Transient Mark mode in general, you might still
-want to use it once in a while. To do this, type @address@hidden
address@hidden or @kbd{C-u C-x C-x}. These commands set or activate the
-mark, and enable Transient Mark mode only until the mark is
-deactivated.
-
address@hidden @kbd
address@hidden address@hidden address@hidden
address@hidden address@hidden address@hidden
-Set the mark at point (like plain @address@hidden), and enable
-Transient Mark mode just once until the mark is deactivated. (This is
-not really a separate command; you are using the @address@hidden
-command twice.)
-
address@hidden C-u C-x C-x
address@hidden C-u C-x C-x
-Activate the mark without changing it; enable Transient Mark mode just
-once, until the mark is deactivated. (This is the @kbd{C-x C-x}
-command, @code{exchange-point-and-mark}, with a prefix argument.)
address@hidden table
-
- One of the secondary features of Transient Mark mode is that certain
-commands operate only on the region, when there is an active region.
-If you don't use Transient Mark mode, the region once set never
-becomes inactive, so there is no way for these commands to make such a
-distinction. Enabling Transient Mark mode momentarily gives you a way
-to use these commands on the region.
-
- Momentary use of Transient Mark mode is also a way to highlight the
-region for the time being.
-
address@hidden Using Region
address@hidden Operating on the Region
-
address@hidden operations on a marked region
- Once you have a region and the mark is active, here are some of the
-ways you can operate on the region:
-
address@hidden @bullet
address@hidden
-Kill it with @kbd{C-w} (@pxref{Killing}).
address@hidden
-Save it in a register with @kbd{C-x r s} (@pxref{Registers}).
address@hidden
-Save it in a buffer or a file (@pxref{Accumulating Text}).
address@hidden
-Convert case with @kbd{C-x C-l} or @kbd{C-x C-u} (@pxref{Case}).
address@hidden
-Indent it with @kbd{C-x @key{TAB}} or @kbd{C-M-\} (@pxref{Indentation}).
address@hidden
-Fill it as text with @kbd{M-x fill-region} (@pxref{Filling}).
address@hidden
-Print hardcopy with @kbd{M-x print-region} (@pxref{Printing}).
address@hidden
-Evaluate it as Lisp code with @kbd{M-x eval-region} (@pxref{Lisp Eval}).
address@hidden
-Undo changes within it using @kbd{C-u C-x u} (@pxref{Undo}).
address@hidden itemize
-
- Most commands that operate on the text in the region have the word
address@hidden in their names.
+ Whenever the mark is active, you can deactivate it by typing
address@hidden (@pxref{Quitting}). The mark is also automatically
+deactivated after certain non-motion commands.
@node Marking Objects
@section Commands to Mark Textual Objects
@cindex marking sections of text
Here are the commands for placing point and the mark around a textual
-object such as a word, list, paragraph or page.
+object such as a word, list, paragraph or page:
@table @kbd
@item M-@@
@@ -322,23 +137,23 @@
@item C-M-@@
Set mark after end of following balanced expression (@code{mark-sexp}).
@item M-h
-Put region around current paragraph (@code{mark-paragraph}).
+Move point to the beginning of the current paragraph, and set mark at
+the end (@code{mark-paragraph}).
@item C-M-h
-Put region around current defun (@code{mark-defun}).
+Move point to the beginning of the current defun, and set mark at the
+end (@code{mark-defun}).
@item C-x h
-Put region around the entire buffer (@code{mark-whole-buffer}).
+Move point to the beginning of the buffer, and set mark at the end
+(@code{mark-whole-buffer}).
@item C-x C-p
-Put region around current page (@code{mark-page}).
+Move point to the beginning of the current page, and set mark at the
+end (@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}. Repeating these
-commands extends the region. For example, you can type either
address@hidden 2 M-@@} or @kbd{M-@@ M-@@} to mark the next two words. These
-commands also extend the region in Transient Mark mode, regardless of
-the last command.
+arguments just like @kbd{M-f} and @kbd{C-M-f}.
@kindex C-x h
@findex mark-whole-buffer
@@ -352,8 +167,7 @@
point. If the prefix argument is @address@hidden, @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. Repeating the @kbd{M-h}
-command extends the region to subsequent paragraphs.
+and the mark goes at the start of the region.
@kbd{C-M-h} (@code{mark-defun}) similarly puts point before, and the
mark after, the current (or following) major top-level definition, or
@@ -367,51 +181,182 @@
argument specifies a later page (if positive) or an earlier page (if
negative) instead of the current page.
+ While the mark is active, repeating the above commands extends the
+region accordingly. For example, you can type either @kbd{C-u 2 M-@@}
+or @kbd{M-@@ M-@@} to mark the next two words. Similarly, repeating
+the @kbd{M-h} command extends the region to subsequent paragraphs.
+
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
the end. (In some programs this is called ``select all.'')
- In Transient Mark mode, all of these commands activate the mark.
address@hidden Using Region
address@hidden Operating on the Region
+
address@hidden operations on a marked region
+ Once you have a region, here are some of the ways you can operate on
+it:
+
address@hidden @bullet
address@hidden
+Kill it with @kbd{C-w} (@pxref{Killing}).
address@hidden
+Copy it to the kill ring with @kbd{M-w} (@pxref{Yanking}).
address@hidden
+Convert case with @kbd{C-x C-l} or @kbd{C-x C-u} (@pxref{Case}).
address@hidden
+Undo changes within it using @kbd{C-u C-/} (@pxref{Undo}).
address@hidden
+Replace text within it using @kbd{M-%} (@pxref{Query Replace}).
address@hidden
+Indent it with @kbd{C-x @key{TAB}} or @kbd{C-M-\} (@pxref{Indentation}).
address@hidden
+Fill it as text with @kbd{M-x fill-region} (@pxref{Filling}).
address@hidden
+Print hardcopy with @kbd{M-x print-region} (@pxref{Printing}).
address@hidden
+Evaluate it as Lisp code with @kbd{M-x eval-region} (@pxref{Lisp Eval}).
address@hidden
+Save it in a register with @kbd{C-x r s} (@pxref{Registers}).
address@hidden
+Save it in a buffer or a file (@pxref{Accumulating Text}).
address@hidden itemize
+
+ Most commands that operate on the text in the region have the word
address@hidden in their names.
+
address@hidden Persistent Mark
address@hidden Persistent Marks
address@hidden mode, Transient Mark
address@hidden Transient Mark mode
address@hidden highlighting region
address@hidden region highlighting
address@hidden Zmacs mode
+
+ By default, the region is highlighted whenever it exists, and it
+disappears once you use it or explicitly deactivate the mark. This
+behavior is called Transient Mark address@hidden is also sometimes
+called @dfn{Zmacs mode}, because the Zmacs editor on the MIT Lisp
+Machine handled the mark in a similar way.}.
+
address@hidden transient-mark-mode
+ Turning off Transient Mark mode switches Emacs to an alternative
+mode of operation, which was the default prior to Emacs 23. When
+Transient Mark mode is off, the mark is persistent: it is @emph{never}
+deactivated, but can be set to different locations using commands such
+as @address@hidden After the first time you set the mark in a
+buffer, there is always a region in that buffer. Emacs will not
+highlight the region, because that would be a nuisance. As an
+exception, the region is temporarily highlighted after it is set with
+the mouse.
+
+ To turn off Transient Mark mode, type @kbd{M-x transient-mark-mode}.
+This command toggles the mode; you can use the same command to turn
+Transient Mark mode on again. You can also toggle Transient Mark mode
+using the menu bar: in the @samp{Options} menu, use the @samp{Active
+Region Highlighting} menu item.
+
+ Here are the details of how Emacs behaves when Transient Mark mode
+is off:
+
address@hidden @bullet
address@hidden
+Emacs does not show where the mark is located---you have to remember.
+The usual solution to this problem is to set the mark and then use it
+soon, before you forget where it is. Alternatively, you can check the
+location of the mark by using @kbd{C-x C-x}, which exchanges the
+positions of the point and the mark (@pxref{Setting Mark}).
+
address@hidden
+Many commands that insert text, such as @kbd{C-y} (@code{yank}),
+position point and the mark at opposite ends of the inserted text, so
+that the region consists of the text just inserted. You can tell when
+a command sets the mark because it displays @samp{Mark set} in the
+echo area.
+
address@hidden
+Many commands that move point long distances, like @kbd{M-<} and
address@hidden, first set the mark where point was.
+
address@hidden
+Some commands that ordinarily operate on the region, if one exists,
+act instead on the entire buffer. For instance, @kbd{C-x u} normally
+reverses changes within the region if one exists; when Transient Mark
+mode is off, it acts on the entire buffer. However, you can type
address@hidden C-x u} to make it operate on the region. @xref{Undo}. Other
+commands that act this way are identified in their own documentation.
address@hidden itemize
+
+ While Transient Mark mode is off, you can activate it temporarily
+using @address@hidden address@hidden or @kbd{C-u C-x C-x}.
+
address@hidden @kbd
address@hidden address@hidden address@hidden
address@hidden address@hidden address@hidden
+Set the mark at point (like plain @address@hidden) and enable
+Transient Mark mode just once, until the mark is deactivated. (This
+is not really a separate command; you are using the @address@hidden
+command twice.)
+
address@hidden C-u C-x C-x
address@hidden C-u C-x C-x
+Activate the mark without changing it; enable Transient Mark mode just
+once, until the mark is deactivated. (This is the @kbd{C-x C-x}
+command, @code{exchange-point-and-mark}, with a prefix argument.)
address@hidden table
+
+ These commands set or activate the mark, and enable Transient Mark
+mode only until the mark is deactivated. One reason you may want to
+use them is that some commands operate on the entire buffer instead of
+the region when Transient Mark mode is off. Enabling Transient Mark
+mode momentarily gives you a way to use these commands on the region.
@node Mark Ring
@section The Mark Ring
address@hidden C-u C-SPC
@cindex mark ring
address@hidden C-u C-@@
Aside from delimiting the region, the mark is also useful for
-remembering a spot that you may want to go back to. To make this
-feature more useful, each buffer remembers 16 previous locations of the
-mark, in the @dfn{mark ring}. Commands that set the mark also push the
-old mark onto this ring. To return to a marked location, use @kbd{C-u
address@hidden (or @kbd{C-u C-@@}); this is the command
address@hidden given a numeric argument. It moves point to
-where the mark was, and restores the mark from the ring of former
-marks.
+remembering spots that you may want to go back to. Each buffer
+remembers 16 previous locations of the mark, in the @dfn{mark ring}.
+Commands that set the mark also push the old mark onto this ring.
+
address@hidden @kbd
address@hidden address@hidden address@hidden
+Set the mark, pushing it onto the mark ring, without activating it.
address@hidden C-u address@hidden
+Move point to where the mark was, and restore the mark from the ring
+of former marks.
address@hidden table
+
address@hidden C-SPC C-SPC
+ The command address@hidden address@hidden is handy when you want to use
+the mark to remember a position to which you may want to return. It
+pushes the current point onto the mark ring, without activating the
+mark (which would cause Emacs to highlight the region). This is
+actually two consecutive invocations of @address@hidden
+(@code{set-mark-command}); the first @address@hidden sets the mark,
+and the second @address@hidden deactivates it. (When Transient Mark
+mode is off, address@hidden address@hidden instead activates Transient Mark
+mode temporarily. @xref{Persistent Mark}.)
+
address@hidden C-u C-SPC
+ To return to a marked position, use @code{set-mark-command} with a
+prefix argument: @kbd{C-u address@hidden This moves point to where the
+mark was, and deactivates the mark if it was active. Each subsequent
address@hidden address@hidden jumps to a prior position stored in the mark
+ring. The positions you move through in this way are not lost; they
+go to the end of the ring.
@vindex set-mark-command-repeat-pop
If you set @code{set-mark-command-repeat-pop} to address@hidden,
-then when you repeat the character @address@hidden after typing
address@hidden address@hidden, each repetition moves point to a previous mark
-position from the ring. The mark positions you move through in this
-way are not lost; they go to the end of the ring.
-
- Each buffer has its own mark ring. All editing commands use the current
-buffer's mark ring. In particular, @kbd{C-u address@hidden always stays in
-the same buffer.
-
- Many commands that can move long distances, such as @kbd{M-<}
-(@code{beginning-of-buffer}), start by setting the mark and saving the
-old mark on the mark ring. This is to make it easier for you to move
-back later. Searches set the mark if they move point. However, in
-Transient Mark mode, these commands do not set the mark when the mark
-is already active. You can tell when a command sets the mark because
-it displays @samp{Mark set} in the echo area.
-
- If you want to move back to the same place over and over, the mark
-ring may not be convenient enough. If so, you can record the position
-in a register for later retrieval (@pxref{RegPos,, Saving Positions in
-Registers}).
+then immediately after you type @kbd{C-u address@hidden, you can type
address@hidden@key{SPC}} instead of @kbd{C-u address@hidden to cycle through
+the mark ring. By default, @code{set-mark-command-repeat-pop} is
address@hidden
+
+ Each buffer has its own mark ring. All editing commands use the
+current buffer's mark ring. In particular, @kbd{C-u address@hidden
+always stays in the same buffer.
@vindex mark-ring-max
The variable @code{mark-ring-max} specifies the maximum number of
@@ -420,10 +365,15 @@
@kbd{C-u address@hidden cycles through the positions currently in the
ring.
address@hidden mark-ring
- The variable @code{mark-ring} holds the mark ring itself, as a list of
-marker objects, with the most recent first. This variable is local in
-every buffer.
address@hidden mark-even-if-inactive
+ If the variable @code{mark-even-if-inactive} is @code{nil}, commands
+can only use the mark and the region when it is active. This variable
+is address@hidden by default.
+
+ If you want to move back to the same place over and over, the mark
+ring may not be convenient enough. If so, you can record the position
+in a register for later retrieval (@pxref{RegPos,, Saving Positions in
+Registers}).
@node Global Mark Ring
@section The Global Mark Ring
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/doc/emacs/mark.texi,v,
Chong Yidong <=