From 2289a7a271a78e5e4977745e4be6ae520be611ce Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 7 Jan 2022 20:30:17 +0200 Subject: [PATCH] Fix "C-SPC C-SPC" after "C-x C-x" * lisp/simple.el (exchange-point-and-mark): Fix what the command does when 'transient-mark-mode' is OFF. (Bug#52896) (cherry picked from commit 19c6cad1821eb896b2ddd0f6eab030f0880ea254) --- lisp/simple.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 9c17f0ea6d3..2822a4a3c23 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -6652,7 +6652,7 @@ mode temporarily." (user-error "No mark set in this buffer")) (set-mark (point)) (goto-char omark) - (cond (temp-highlight + (cond ((and (not arg) (not temp-highlight)) (setq-local transient-mark-mode (cons 'only transient-mark-mode))) ((xor arg (not (region-active-p))) (deactivate-mark)) -- 2.39.2