Subject: Re: bug#62709: 29.0.60; quail-minibuffer-message prevents set-mark-command from activating region in minibuffer

From: Eli Zaretskii <[email-masked]>
Date: Fri, 07 Apr 2023 17:57:02 +0300

> From: Visuwesh <[email-masked]>
> Cc: [email-masked]
> Date: Fri, 07 Apr 2023 20:09:13 +0530
> 
> [வெள்ளி ஏப்ரல் 07, 2023] Visuwesh wrote:
> 
> >> I'd prefer to solve the problem that prevents the region from becoming
> >> active, without changing how Quail shows its messages.  Can you try
> >> finding such a solution, 
> >
> > One solution would be to use an overlay to show the guidance string,
> > like what `minibuffer-depth-mode' does.
> 
> I came close to solving the issue with an overlay but I hit a roadblock
> with the cursor property.

Thanks, but I think this is an unnecessary complication.

Does the patch below fix the problems you saw, without introducing any
regressions?

diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index 2ffe339..317ea84 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -1995,7 +1995,8 @@ quail-require-guidance-buf
 (defun quail-minibuffer-message (string)
   (message nil)
   (let ((point-max (point-max))
-	(inhibit-quit t))
+	(inhibit-quit t)
+        (deactivate-mark nil))
     (save-excursion
       (goto-char point-max)
       (insert string))