branch: externals/pyim commit b33d2f2a752f449060bed064456e98bbb42d1bf9 Author: Feng Shu <tuma...@163.com> Commit: Feng Shu <tuma...@163.com>
cl-defgeneric pyim-dcache-update --- pyim-dcache.el | 5 ++--- pyim-dhashcache.el | 3 ++- pyim-dregcache.el | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pyim-dcache.el b/pyim-dcache.el index f19d222d8c..edc8392a3d 100644 --- a/pyim-dcache.el +++ b/pyim-dcache.el @@ -214,11 +214,10 @@ non-nil,文件存在时将会提示用户是否覆盖,默认为覆盖模式" (message "PYIM: 个人词条导出完成。")) ;; ** Dcache 更新功能 -(defun pyim-dcache-update (&optional force) +(cl-defgeneric pyim-dcache-update (&optional force) "读取并加载所有相关词库 dcache. -如果 FORCE 为真,强制加载。" - (pyim-dcache-call-api 'update force)) +如果 FORCE 为真,强制加载。") (defun pyim-dcache-create-files-md5 (files) "为 FILES 生成 md5 字符串。" diff --git a/pyim-dhashcache.el b/pyim-dhashcache.el index 0e8de2f2cc..d9dd07b130 100644 --- a/pyim-dhashcache.el +++ b/pyim-dhashcache.el @@ -79,7 +79,8 @@ (defvar pyim-dhashcache-update-iword2priority-p nil) (defvar pyim-dhashcache-update-code2word-running-p nil) -(defun pyim-dhashcache-update (&optional force) +(cl-defmethod pyim-dcache-update + (&context (pyim-dcache-backend (eql pyim-dhashcache)) &optional force) "读取并加载所有相关词库 dcache. 如果 FORCE 为真,强制加载。" diff --git a/pyim-dregcache.el b/pyim-dregcache.el index 5e6a62cd98..1b9487ece5 100644 --- a/pyim-dregcache.el +++ b/pyim-dregcache.el @@ -44,7 +44,8 @@ (defvar pyim-dregcache-iword2count nil) (defvar pyim-dregcache-dicts-md5 nil) -(defun pyim-dregcache-update (&optional force) +(cl-defmethod pyim-dcache-update + (&context (pyim-dcache-backend (eql pyim-dregcache)) &optional force) "读取并加载所有相关词库 dcache. 如果 FORCE 为真,强制加载。"