]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't attempt to display input method guidance in expired minibuffers
authorAlan Mackenzie <acm@muc.de>
Sun, 31 Jan 2021 11:20:50 +0000 (11:20 +0000)
committerAlan Mackenzie <acm@muc.de>
Sun, 31 Jan 2021 11:20:50 +0000 (11:20 +0000)
This caused infinite waits in circumstances involving setting an input method
in a global minor mode.  This commit fixes bug #45792.

* lisp/international/quail.el (quail-show-guidance): Test the major mode is
not minibuffer-inactive-mode before proceding with the function.

lisp/international/quail.el

index 0901115cffebbc84e045cac8c99daca2a03215aa..c66aa6a53756651ea16db7463dea97b604d8b223 100644 (file)
@@ -2027,10 +2027,15 @@ minibuffer and the selected frame has no other windows)."
   (bury-buffer quail-completion-buf)
 
   ;; Then, show the guidance.
-  (when (and (quail-require-guidance-buf)
-            (not input-method-use-echo-area)
-            (null unread-command-events)
-            (null unread-post-input-method-events))
+  (when (and 
+         ;; Don't try to display guidance on an expired minibuffer.  This
+         ;; would go into an infinite wait rather than executing the user's
+         ;; command.  Bug #45792.
+         (not (eq major-mode 'minibuffer-inactive-mode))
+         (quail-require-guidance-buf)
+        (not input-method-use-echo-area)
+        (null unread-command-events)
+        (null unread-post-input-method-events))
     (if (minibufferp)
        (if (eq (minibuffer-window) (frame-root-window))
            ;; Use another frame.  It is sure that we are using some