Subject: Re: bug#52896: 29.0.50; transient-mark-mode is set to a lot of 'only syms

From: Eli Zaretskii <[email-masked]>
Date: Mon, 03 Jan 2022 16:54:35 +0200

> Date: Mon, 03 Jan 2022 16:21:52 +0200
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked]
> 
> Thanks.  Does the patch below give good results, i.e. does it fix this
> problem without introducing any others?

Sorry, please use the patch below instead:

diff --git a/lisp/simple.el b/lisp/simple.el
index 070d276..cbcde9f 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -6664,7 +6664,7 @@ exchange-point-and-mark
         (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))