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

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

[elpa] externals/pyim 0c01847 3/7: Add pyim-dcache-update-personal-words


From: ELPA Syncer
Subject: [elpa] externals/pyim 0c01847 3/7: Add pyim-dcache-update-personal-words.
Date: Sat, 24 Apr 2021 09:57:10 -0400 (EDT)

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

    Add pyim-dcache-update-personal-words.
    
        * pyim.el (pyim-start): Use pyim-dcache-update-personal-words.
    
        * pyim-dcache.el (pyim-dcache-update-personal-words): New function.
---
 pyim-dcache.el | 6 ++++++
 pyim.el        | 3 +--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/pyim-dcache.el b/pyim-dcache.el
index 80ccbdf..4d02a64 100644
--- a/pyim-dcache.el
+++ b/pyim-dcache.el
@@ -186,6 +186,12 @@ VARIABLE 变量,FORCE-RESTORE 设置为 t 时,强制恢复,变量原来的
          (dicts-md5 (pyim-dcache-create-dicts-md5 dict-files)))
     (pyim-dcache-call-api 'update-code2word dict-files dicts-md5 force)))
 
+(defun pyim-dcache-update-personal-words (&optional force)
+  "更新个人缓存词库。
+如果 FORCE non-nil, 则强制更新。"
+  (when pyim-dcache-auto-update
+    (pyim-dcache-call-api 'update-personal-words force)))
+
 (defun pyim-dcache-init-variables ()
   "初始化 dcache 缓存相关变量."
   (pyim-dcache-call-api 'init-variables))
diff --git a/pyim.el b/pyim.el
index 7280c71..d555a75 100644
--- a/pyim.el
+++ b/pyim.el
@@ -202,8 +202,7 @@ pyim 使用函数 `pyim-start' 启动输入法的时候,会将变量
 
   (pyim-dcache-init-variables)
 
-  (when pyim-dcache-auto-update
-    (pyim-dcache-call-api 'update-personal-words restart))
+  (pyim-dcache-update-personal-words restart)
 
   (pyim-pymap-cchar2py-cache-create)
   (pyim-pymap-py2cchar-cache-create)



reply via email to

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