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

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

[elpa] externals/pyim 3923204 1/2: Add pyim-process-async-delay.


From: ELPA Syncer
Subject: [elpa] externals/pyim 3923204 1/2: Add pyim-process-async-delay.
Date: Wed, 15 Dec 2021 17:57:35 -0500 (EST)

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

    Add pyim-process-async-delay.
    
        * pyim-process.el (pyim-process-async-delay): New defcustom.
        (pyim-process-run-1): Use pyim-process-async-delay.
---
 pyim-process.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/pyim-process.el b/pyim-process.el
index f59422c..ee68c65 100644
--- a/pyim-process.el
+++ b/pyim-process.el
@@ -71,6 +71,10 @@
 如果为 0 或者 nil, 则不等待立刻显示可选词."
   :type 'integer)
 
+(defcustom pyim-process-async-delay 0.3
+  "延迟多少秒开始异步获取词条。"
+  :type 'integer)
+
 (defvar pyim-process-input-ascii nil
   "是否开启 pyim 英文输入模式.")
 
@@ -252,7 +256,9 @@
     ;; 注意事项:异步流程对 page tooltip 有要求, 有些 page tooltip 是无法支持异
     ;; 步流程的。
     (setq pyim-process-run-async-timer
-          (run-with-timer 1 nil #'pyim-process-run-async))
+          (run-with-timer
+           pyim-process-async-delay
+           nil #'pyim-process-run-async))
     ;; 自动上屏功能
     (let ((autoselector-results
            (mapcar (lambda (x)



reply via email to

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