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

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

[elpa] externals/pyim b61482b 6/7: * pyim-dcache.el (pyim-dcache-search-


From: ELPA Syncer
Subject: [elpa] externals/pyim b61482b 6/7: * pyim-dcache.el (pyim-dcache-search-word-code): Add new function.
Date: Sat, 24 Apr 2021 09:57:10 -0400 (EDT)

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

    * pyim-dcache.el (pyim-dcache-search-word-code): Add new function.
---
 pyim-dcache.el | 4 ++++
 pyim.el        | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/pyim-dcache.el b/pyim-dcache.el
index aca66c4..92407e9 100644
--- a/pyim-dcache.el
+++ b/pyim-dcache.el
@@ -287,6 +287,10 @@ MERGE-METHOD 是一个函数,这个函数需要两个数字参数,代表
 
   (message "pyim: 词条相关信息导入完成!"))
 
+(defun pyim-dcache-search-word-code (word)
+  "搜素中文词条 WORD 对应的 code."
+  (pyim-dcache-call-api 'search-word-code word))
+
 (defun pyim-dcache-delete-word (word)
   "将中文词条 WORD 从个人词库中删除"
   (pyim-dcache-call-api 'delete-word word))
diff --git a/pyim.el b/pyim.el
index 647384b..6567e2e 100644
--- a/pyim.el
+++ b/pyim.el
@@ -351,7 +351,7 @@ BUG:拼音无法有效地处理多音字。"
            code)
       (if (not (string-match-p "^\\cc+\\'" string))
           (error "不是纯中文字符串")
-        (setq code (pyim-dcache-call-api 'search-word-code string))
+        (setq code (pyim-dcache-search-word-code string))
         (if code
             (message "%S -> %S " string code)
           (message "没有找到 %S 对应的编码。" string))))))



reply via email to

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