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

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

[elpa] externals/pyim 807505d 1/2: Remove pyim-candidate-parse.


From: ELPA Syncer
Subject: [elpa] externals/pyim 807505d 1/2: Remove pyim-candidate-parse.
Date: Sun, 21 Nov 2021 23:57:29 -0500 (EST)

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

    Remove pyim-candidate-parse.
    
        * pyim-process.el (pyim-process-outcome-handle): do not use 
pyim-candidate-parse.
    
        * pyim-preview.el (pyim-preview-refresh): do not use 
pyim-candidate-parse.
    
        * pyim-page.el (pyim-page-preview-create:quanpin): do not use 
pyim-candidate-parse.
    
        * pyim-candidates.el (pyim-candidate-parse): removed.
---
 pyim-candidates.el | 11 -----------
 pyim-page.el       |  5 ++---
 pyim-preview.el    |  5 ++---
 pyim-process.el    | 14 ++++++--------
 4 files changed, 10 insertions(+), 25 deletions(-)

diff --git a/pyim-candidates.el b/pyim-candidates.el
index ca2d33d..8b54bc0 100644
--- a/pyim-candidates.el
+++ b/pyim-candidates.el
@@ -195,17 +195,6 @@ IMOBJS 获得候选词条。"
   "`pyim-candidates-create' 处理双拼输入法的函数."
   (pyim-candidates-create:quanpin imobjs 'quanpin async))
 
-(defun pyim-candidate-parse (candidate)
-  (let ((output
-         (if (consp candidate)
-             (car candidate)
-           candidate)))
-    (if (stringp output)
-        ;; 注:五笔支持 comments 遗留下来的代码,现在作为兼容而保留,
-        ;; 等用户的 dcache 都升级之后,这个就可以删除了。
-        (car (split-string output ":"))
-      output)))
-
 ;; * Footer
 (provide 'pyim-candidates)
 
diff --git a/pyim-page.el b/pyim-page.el
index e064d49..5ebc340 100644
--- a/pyim-page.el
+++ b/pyim-page.el
@@ -310,9 +310,8 @@ page 的概念,比如,上面的 “nihao” 的 *待选词列表* 就可以
      (when (and (eq pyim-assistant-scheme 'quanpin)
                 (eq pyim-assistant-scheme-enable t))
        (let ((code (pyim-cstring-to-xingma
-                    (pyim-candidate-parse
-                     (nth (1- pyim-candidate-position)
-                          pyim-candidates))
+                    (nth (1- pyim-candidate-position)
+                         pyim-candidates)
                     (pyim-scheme-name 'default))))
          (if (> (length code) 0)
              (format " [%s](辅)" code)
diff --git a/pyim-preview.el b/pyim-preview.el
index 7b2b223..9dde2cd 100644
--- a/pyim-preview.el
+++ b/pyim-preview.el
@@ -74,9 +74,8 @@ pyim 会使用 Emacs overlay 机制在 *待输入buffer* 光标处高亮显示
   (let* ((class (pyim-scheme-get-option (pyim-scheme-name) :class))
          (candidates pyim-candidates)
          (pos (1- (min pyim-candidate-position (length candidates))))
-         (preview
-          (concat (pyim-outcome-get)
-                  (pyim-candidate-parse (nth pos candidates)))))
+         (preview (concat (pyim-outcome-get)
+                          (nth pos candidates))))
     (when (memq class '(quanpin))
       (let ((rest (mapconcat
                    (lambda (py)
diff --git a/pyim-process.el b/pyim-process.el
index 82db87e..6758600 100644
--- a/pyim-process.el
+++ b/pyim-process.el
@@ -352,18 +352,16 @@
                   (pyim-process-outcome-handle-char last-command-event))
           pyim-outcome-history))
         ((eq type 'candidate)
-         (let* ((candidate
-                 (pyim-candidate-parse
-                  (nth (1- pyim-candidate-position)
-                       pyim-candidates))))
+         (let ((candidate
+                (nth (1- pyim-candidate-position)
+                     pyim-candidates)))
            (push
             (concat (pyim-outcome-get) candidate)
             pyim-outcome-history)))
         ((eq type 'candidate-and-last-char)
-         (let* ((candidate
-                 (pyim-candidate-parse
-                  (nth (1- pyim-candidate-position)
-                       pyim-candidates))))
+         (let ((candidate
+                (nth (1- pyim-candidate-position)
+                     pyim-candidates)))
            (push
             (concat (pyim-outcome-get)
                     candidate



reply via email to

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