emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/pyim da8cc5d 1/6: * pyim.el (pyim-exit-from-minibuffer)


From: ELPA Syncer
Subject: [elpa] externals/pyim da8cc5d 1/6: * pyim.el (pyim-exit-from-minibuffer): Remove itself from minbuffer-exit-hook.
Date: Sun, 25 Apr 2021 00:57:11 -0400 (EDT)

branch: externals/pyim
commit da8cc5de226d0d465a495811aa26216310cbd0b6
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>

    * pyim.el (pyim-exit-from-minibuffer): Remove itself from 
minbuffer-exit-hook.
---
 pyim.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/pyim.el b/pyim.el
index b3d0b00..e4e5236 100644
--- a/pyim.el
+++ b/pyim.el
@@ -224,10 +224,9 @@ pyim 使用函数 `pyim-start' 启动输入法的时候,会将变量
 
 (defun pyim-exit-from-minibuffer ()
   "Pyim 从 minibuffer 退出."
-  ;; FIXME: `quail-exit-from-minibuffer' removes itself from
-  ;; `minibuffer-exit-hook' but it won't remove `pyim-exit-from-minibuffer' 
from
-  ;; that hook.  Is that indeed what we want here?
-  (quail-exit-from-minibuffer))
+  (quail-exit-from-minibuffer)
+  (when (<= (minibuffer-depth) 1)
+    (remove-hook 'minibuffer-exit-hook 'pyim-exit-from-minibuffer)))
 
 (defun pyim-restart ()
   "重启 pyim,不建议用于编程环境.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]