From d01a391195e4f6282a587fcc581bb6cd8b2204e1 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 12 Mar 2025 10:13:07 +0800 Subject: [PATCH] ; Touch up docs for exchange-point-and-mark-highlight-region --- etc/NEWS | 5 +++-- lisp/simple.el | 11 ++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index af7a5e38b73..f39daa112c7 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -484,8 +484,9 @@ modal editing packages. ** New user variable 'exchange-point-and-mark-highlight-region'. When set to nil, this modifies `exchange-point-and-mark' so that it doesn't -activate mark when it is not already active. -The default value is 't' which changes nothing to previous behavior. +activate the mark if it is not already active. +The default value is t, which retains the old behavior. +This variable has no effect when Transient Mark mode is off. * Changes in Specialized Modes and Packages in Emacs 31.1 diff --git a/lisp/simple.el b/lisp/simple.el index df8f8276812..08ea5e27ab8 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -7457,17 +7457,18 @@ Does not set point. Does nothing if mark ring is empty." (defcustom exchange-point-and-mark-highlight-region t "Activate region when exchanging point and mark. -When set to nil, this modifies `exchange-point-and-mark' so that it doesn't -activate mark when it is not already active." +When set to nil, this modifies `exchange-point-and-mark' so that it +doesn't activate the mark if it is not already active. + +This variable has no effect when Transient Mark mode is off." :type 'boolean :group 'editing-basics :version "31.1") (defun exchange-point-and-mark (&optional arg) "Put the mark where point is now, and point where the mark is now. -This command works even when the mark is not active, -and it reactivates the mark unless -`exchange-point-and-mark-highlight-region' is nil. +This command works even when the mark is not active, and it reactivates +the mark unless `exchange-point-and-mark-highlight-region' is nil. If Transient Mark mode is on, a prefix ARG deactivates the mark if it is active, and otherwise avoids reactivating it. If