[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim b56ee61 4/7: Add pyim-dcache-update-shortcode2word
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pyim b56ee61 4/7: Add pyim-dcache-update-shortcode2word. |
Date: |
Sat, 24 Apr 2021 09:57:10 -0400 (EDT) |
branch: externals/pyim
commit b56ee61393c0e4d6509689c62eb7d157008018fa
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
Add pyim-dcache-update-shortcode2word.
* pyim.el (pyim-start): Use pyim-dcache-update-shortcode2word.
* pyim-dcache.el (pyim-dcache-update-shortcode2word): New function.
---
pyim-dcache.el | 7 +++++++
pyim.el | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/pyim-dcache.el b/pyim-dcache.el
index 4d02a64..7ac2377 100644
--- a/pyim-dcache.el
+++ b/pyim-dcache.el
@@ -192,6 +192,13 @@ VARIABLE 变量,FORCE-RESTORE 设置为 t 时,强制恢复,变量原来的
(when pyim-dcache-auto-update
(pyim-dcache-call-api 'update-personal-words force)))
+(defun pyim-dcache-update-shortcode2word (&optional force)
+ "更新 shortcode2word 缓存。
+
+如果 FORCE non-nil, 则强制更新。"
+ (when pyim-dcache-auto-update
+ (pyim-dcache-call-api 'update-shortcode2word force)))
+
(defun pyim-dcache-init-variables ()
"初始化 dcache 缓存相关变量."
(pyim-dcache-call-api 'init-variables))
diff --git a/pyim.el b/pyim.el
index d555a75..ced219e 100644
--- a/pyim.el
+++ b/pyim.el
@@ -211,7 +211,7 @@ pyim 使用函数 `pyim-start' 启动输入法的时候,会将变量
(when pyim-dcache-auto-update
(pyim-dcache-update-code2word refresh-common-dcache)
;; 这个命令 *当前* 主要用于五笔输入法。
- (pyim-dcache-call-api 'update-shortcode2word restart))
+ (pyim-dcache-update-shortcode2word restart))
;; Make sure personal or other dcache are saved to file before kill emacs.
(add-hook 'kill-emacs-hook #'pyim-dcache-save-caches)
- [elpa] externals/pyim updated (d07fc68 -> 1d8a7a2), ELPA Syncer, 2021/04/24
- [elpa] externals/pyim 426e06c 1/7: Add pyim-dcache-delete-word., ELPA Syncer, 2021/04/24
- [elpa] externals/pyim 0c01847 3/7: Add pyim-dcache-update-personal-words., ELPA Syncer, 2021/04/24
- [elpa] externals/pyim 38cabb2 5/7: * pyim.el (pyim-start): do not use pyim-dcache-auto-update., ELPA Syncer, 2021/04/24
- [elpa] externals/pyim 1d8a7a2 7/7: Add pyim-dcache-update-iword2count and pyim-dcache-insert-icode2word, ELPA Syncer, 2021/04/24
- [elpa] externals/pyim c9258c4 2/7: * pyim.el (pyim-insert-word-into-icode2word): Remove., ELPA Syncer, 2021/04/24
- [elpa] externals/pyim b61482b 6/7: * pyim-dcache.el (pyim-dcache-search-word-code): Add new function., ELPA Syncer, 2021/04/24
- [elpa] externals/pyim b56ee61 4/7: Add pyim-dcache-update-shortcode2word.,
ELPA Syncer <=