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

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

[elpa] externals/pyim b974f0b: pyim-process-create-pyim-word -> pyim-pro


From: ELPA Syncer
Subject: [elpa] externals/pyim b974f0b: pyim-process-create-pyim-word -> pyim-process-create-word
Date: Tue, 8 Jun 2021 04:57:13 -0400 (EDT)

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

    pyim-process-create-pyim-word -> pyim-process-create-word
    
        * pyim.el (pyim-select-word:pinyin): Use pyim-process-create-word.
        (pyim-select-word:xingma): Use pyim-process-create-word.
    
        * pyim-process.el (pyim-process-create-pyim-word): Remove.
    
        * pyim-liberime.el (pyim-select-word:rime): Use 
pyim-process-create-word.
        (pyim-liberime-process-create-word): Rename from 
pyim-process-create-rime-word.
        (pyim-process-create-word): advice add 
pyim-liberime-process-create-word.
---
 pyim-liberime.el | 8 ++++----
 pyim-process.el  | 3 ---
 pyim.el          | 8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/pyim-liberime.el b/pyim-liberime.el
index 94bca7e..9dbd526 100644
--- a/pyim-liberime.el
+++ b/pyim-liberime.el
@@ -164,8 +164,8 @@
       ;; 使用 rime 的同时,也附带的优化 quanpin 的词库。
       (let ((pyim-default-scheme 'quanpin))
         (if (member (pyim-outcome-get) pyim-candidates)
-            (pyim-process-create-pyim-word (pyim-outcome-get) t)
-          (pyim-process-create-pyim-word (pyim-outcome-get))))
+            (pyim-process-create-word (pyim-outcome-get) t)
+          (pyim-process-create-word (pyim-outcome-get))))
       (setq pyim-liberime-code-log nil)
       (setq pyim-liberime-word-log nil)
       (pyim-process-terminate)
@@ -225,7 +225,7 @@
                 (setq words nil))
                (t (liberime-process-key 65366))))))))))
 
-(defun pyim-process-create-rime-word (word &optional _prepend 
_wordcount-handler)
+(defun pyim-liberime-process-create-word (word &optional _prepend 
_wordcount-handler)
   "Create WORD at current rime backend.
 ONlY works with quanpin."
   ;; 判断当前 rime 环境是否支持全拼,如果支持,就添加词条。
@@ -239,7 +239,7 @@ ONlY works with quanpin."
              (remove "" (split-string word "")))
             (pyim-process-terminate:rime)))))))
 
-(advice-add 'pyim-process-create-word :after #'pyim-process-create-rime-word)
+(advice-add 'pyim-process-create-word :after 
#'pyim-liberime-process-create-word)
 
 (defun pyim-liberime-get-code (word input &optional _limit)
   "Get the code of WORD from the beginning of INPUT.
diff --git a/pyim-process.el b/pyim-process.el
index c1eed3f..2449f73 100644
--- a/pyim-process.el
+++ b/pyim-process.el
@@ -444,9 +444,6 @@ alist 列表。"
             str))))
 
 (defun pyim-process-create-word (word &optional prepend wordcount-handler)
-  (pyim-process-create-pyim-word word prepend wordcount-handler))
-
-(defun pyim-process-create-pyim-word (word &optional prepend wordcount-handler)
   "将中文词条 WORD 添加编码后,保存到用户选择过的词生成的缓存中。
 
 词条 WORD 默认会追加到已有词条的后面,如果 PREPEND 设置为 t,
diff --git a/pyim.el b/pyim.el
index 7fa2ebc..a0acb83 100644
--- a/pyim.el
+++ b/pyim.el
@@ -536,8 +536,8 @@ FILE 的格式与 `pyim-dcache-export' 生成的文件格式相同,
       ;; 3. pyim 在启动的时候,会使用词频信息,对个人词库作一次排序。
       ;;    用作 pyim 下一次使用。
       (if (member (pyim-process-get-outcome) (pyim-process-get-candidates))
-          (pyim-process-create-pyim-word (pyim-process-get-outcome) t)
-        (pyim-process-create-pyim-word (pyim-process-get-outcome)))
+          (pyim-process-create-word (pyim-process-get-outcome) t)
+        (pyim-process-create-word (pyim-process-get-outcome)))
 
       (pyim-process-terminate)
       ;; pyim 使用这个 hook 来处理联想词。
@@ -559,8 +559,8 @@ FILE 的格式与 `pyim-dcache-export' 生成的文件格式相同,
     ;; 型码输入法,只考虑将词条保存到个人词库,用于调整词频,单字不保存。
     (when (> (length (pyim-process-get-outcome)) 1)
       (if (member (pyim-process-get-outcome) (pyim-process-get-candidates))
-          (pyim-process-create-pyim-word (pyim-process-get-outcome) t)
-        (pyim-process-create-pyim-word (pyim-process-get-outcome))))
+          (pyim-process-create-word (pyim-process-get-outcome) t)
+        (pyim-process-create-word (pyim-process-get-outcome))))
     (pyim-process-terminate)
     ;; pyim 使用这个 hook 来处理联想词。
     (run-hooks 'pyim-select-finish-hook)))



reply via email to

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