[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim f6cc674 3/5: Fix 3.7版造词功能有点问题 #395
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pyim f6cc674 3/5: Fix 3.7版造词功能有点问题 #395 |
Date: |
Tue, 4 May 2021 07:57:15 -0400 (EDT) |
branch: externals/pyim
commit f6cc6744250814a5560e59c0d7e3a6e99b4a86ec
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
Fix 3.7版造词功能有点问题 #395
---
pyim-codes.el | 4 ++--
pyim-cstring.el | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/pyim-codes.el b/pyim-codes.el
index 4dc7054..2d02584 100644
--- a/pyim-codes.el
+++ b/pyim-codes.el
@@ -83,12 +83,12 @@
(let* ((prefix (pyim-scheme-get-option scheme-name :code-prefix))
(code (cl-find-if
(lambda (x)
- (equal (nth 0 (pyim-dcache-code-split (or x " ")))
+ (equal (nth 0 (pyim-dcache-code-split x))
prefix))
(sort
(cl-copy-list (pyim-dcache-call-api 'search-word-code word))
(lambda (a b) (> (length a) (length b)))))))
- (nth 1 (pyim-dcache-code-split (or code " "))))))
+ (nth 1 (pyim-dcache-code-split code)))))
;; * Footer
(provide 'pyim-codes)
diff --git a/pyim-cstring.el b/pyim-cstring.el
index 4957095..962930d 100644
--- a/pyim-cstring.el
+++ b/pyim-cstring.el
@@ -303,12 +303,12 @@ code-prefix)。当RETURN-LIST 设置为 t 时,返回一个 code list。"
code))))
(defun pyim-cstring-to-xingma:wubi (string)
- "返回汉字 STRING 的五笔编码(不包括 code-prefix)。当RETURN-LIST
+ "返回汉字 STRING 的五笔编码(不包括 code-prefix)。当 RETURN-LIST
设置为 t 时,返回一个编码列表。"
(when (string-match-p "^\\cc+\\'" string)
(let ((code (pyim-code-search string 'wubi))
(len (length string)))
- (when (string-empty-p code)
+ (unless code
(when (= len 1)
(error "No code found for %s" string))
(setq string (split-string string "" t)