branch: externals/pyim commit d8391818289f035bdb79dec681ce3c4adbd0b77b Author: Feng Shu <tuma...@163.com> Commit: Feng Shu <tuma...@163.com>
Remove pyim-dcache-update-personal-words and pyim-dcache-update-code2word. * pyim-dcache.el (pyim-dcache-update-personal-words) (pyim-dcache-update-code2word): removed. --- pyim-dcache.el | 17 +---------------- tests/pyim-tests.el | 2 +- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/pyim-dcache.el b/pyim-dcache.el index 01c6ef2..86a1f6f 100644 --- a/pyim-dcache.el +++ b/pyim-dcache.el @@ -206,17 +206,8 @@ non-nil,文件存在时将会提示用户是否覆盖,默认为覆盖模式" 如果 FORCE 为真,强制加载。" (pyim-dcache-init-variables) - (pyim-dcache-update-personal-words force) - (pyim-dcache-update-code2word force)) - -(defun pyim-dcache-update-code2word (&optional force) - "读取并加载词库. - -读取 `pyim-dicts' 和 `pyim-extra-dicts' 里面的词库文件,生成对应的 -词库缓冲文件,然后加载词库缓存。 - -如果 FORCE 为真,强制加载。" (when pyim-dcache-auto-update + (pyim-dcache-call-api 'update-personal-words force) (let* ((dict-files (mapcar (lambda (x) (unless (plist-get x :disable) (plist-get x :file))) @@ -232,12 +223,6 @@ non-nil,文件存在时将会提示用户是否覆盖,默认为覆盖模式" dict-files))))) dicts-md5)) -(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-update-iword2count (word &optional prepend wordcount-handler) "保存词频到缓存." (pyim-dcache-call-api 'update-iword2count word prepend wordcount-handler)) diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el index 42495db..5824c05 100644 --- a/tests/pyim-tests.el +++ b/tests/pyim-tests.el @@ -770,7 +770,7 @@ yin-xing 因行 words) (should (eq (length pyim-dregcache-cache) 0)) ;; load dictionary - (pyim-dcache-update-code2word t) + (pyim-dcache-update t) ;; cache is filled (should (> (length pyim-dregcache-cache) 0))