]> git.eshelyaron.com Git - emacs.git/commitdiff
; More accurate documentation of 'set-mark-command'
authorEli Zaretskii <eliz@gnu.org>
Thu, 21 Nov 2024 09:47:07 +0000 (11:47 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 27 Nov 2024 19:50:02 +0000 (20:50 +0100)
* doc/emacs/mark.texi (Setting Mark, Global Mark Ring): Explain
that activating an existing mark doesn't set a new mark, and
doesn't push the mark onto the global mark ring.  (Bug#74438)

(cherry picked from commit 4d80c4f4858916becd528b236b29085d29cf3706)

doc/emacs/mark.texi

index 83261d3649565e084e2e9016417ce11c2d6b9b73..54ec6a3f3be5d0fa917dcb7f9b687544c15471d6 100644 (file)
@@ -112,7 +112,8 @@ to @code{set-mark-command}, so unless you are unlucky enough to have
 a text terminal that behaves differently, you might as well think of
 @kbd{C-@@} as @kbd{C-@key{SPC}}.}.  This sets the mark where point is,
 and activates it.  You can then move point away, leaving the mark
-behind.
+behind.  If the mark is already set where point is, this command doesn't
+set another mark, but only activates the existing mark.
 
   For example, suppose you wish to convert part of the buffer to upper
 case.  To accomplish this, go to one end of the desired text, type
@@ -400,6 +401,11 @@ of buffers that you have been in, and, for each buffer, a place where
 you set the mark.  The length of the global mark ring is controlled by
 @code{global-mark-ring-max}, and is 16 by default.
 
+  Note that a mark is recorded in the global mark ring only when some
+command sets the mark.  If an existing mark is merely activated, as is
+the case when you use @kbd{C-@key{SPC}} where a mark is already set
+(@pxref{Setting Mark}), that doesn't push the mark onto the global ring.
+
 @kindex C-x C-SPC
 @findex pop-global-mark
   The command @kbd{C-x C-@key{SPC}} (@code{pop-global-mark}) jumps to