From: Eli Zaretskii Date: Fri, 7 Jan 2022 18:30:17 +0000 (+0200) Subject: Fix "C-SPC C-SPC" after "C-x C-x" X-Git-Tag: emacs-28.0.92~51 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2289a7a271a78e5e4977745e4be6ae520be611ce;p=emacs.git 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) --- 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))