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

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

[elpa] externals/pyim d10ece6d94 2/3: Update pyim-candidate-create-async


From: ELPA Syncer
Subject: [elpa] externals/pyim d10ece6d94 2/3: Update pyim-candidate-create-async.
Date: Sat, 4 Jun 2022 21:57:48 -0400 (EDT)

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

    Update pyim-candidate-create-async.
    
            * pyim-candidates.el (pyim-candidates-create-async): 
pyim-cregexp-build use scheme argument.
            (pyim-candidates-create-async): Directly call quanpin method.
---
 pyim-candidates.el | 9 +++++----
 pyim-scheme.el     | 2 ++
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/pyim-candidates.el b/pyim-candidates.el
index 53440ed15e..29f453fe41 100644
--- a/pyim-candidates.el
+++ b/pyim-candidates.el
@@ -298,7 +298,7 @@
       `(,(car pyim-candidates)
         ,@(pyim-candidates-cloud-search str scheme)
         ,@(pyim-candidates-search-buffer
-           (pyim-cregexp-build str 3 t))
+           (pyim-cregexp-build str 3 t scheme))
         ,@(cdr pyim-candidates)))))
 
 (cl-defgeneric pyim-candidates-cloud-search (string scheme)
@@ -330,10 +330,11 @@
                       (> (or (gethash a counts) 0)
                          (or (gethash b counts) 0))))))))
 
-(cl-defmethod pyim-candidates-create-async (_imobjs (_scheme 
pyim-scheme-shuangpin))
+(cl-defmethod pyim-candidates-create-async (imobjs (_scheme 
pyim-scheme-shuangpin))
   "按照 SCHEME, 用异步的方式从 IMOBJS 获得候选词条,用于双拼输入法。"
-  (let ((pyim-default-scheme 'quanpin))
-    (cl-call-next-method)))
+  ;; 注意:pyim 支持的双拼输入法,内部使用全拼的 imobjs, 所以这里直接调用全拼的
+  ;; `pyim-candidates-create-async' 方法来处理 imobjs。
+  (pyim-candidates-create-async imobjs (pyim-scheme-get 'quanpin)))
 
 ;; * Footer
 (provide 'pyim-candidates)
diff --git a/pyim-scheme.el b/pyim-scheme.el
index ffe81b6a7f..cdb3b278e1 100644
--- a/pyim-scheme.el
+++ b/pyim-scheme.el
@@ -152,6 +152,8 @@
        (equal (pyim-scheme-name x) scheme-name))
      pyim-schemes)))
 
+;; 注意:这个 quanpin scheme 在 pyim 中有特殊的作用,许多功能都依赖 quanpin
+;; scheme 的存在,所以这个 scheme 不可以删除,也不可以更改名字。
 (pyim-scheme-add
  '(quanpin
    :document "全拼输入法方案(不可删除)。"



reply via email to

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