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

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

[elpa] externals/pyim 80c81b88cf 48/58: pyim-pinyin-valid-charpy-p -> py


From: ELPA Syncer
Subject: [elpa] externals/pyim 80c81b88cf 48/58: pyim-pinyin-valid-charpy-p -> pyim-pinyin--valid-charpy-p
Date: Fri, 24 Jun 2022 06:57:55 -0400 (EDT)

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

    pyim-pinyin-valid-charpy-p -> pyim-pinyin--valid-charpy-p
---
 pyim-pinyin.el      |  6 +++---
 tests/pyim-tests.el | 12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/pyim-pinyin.el b/pyim-pinyin.el
index bd856701a1..ecac3d6989 100644
--- a/pyim-pinyin.el
+++ b/pyim-pinyin.el
@@ -89,7 +89,7 @@
     (cons shenmu
           (substring pinyin (length shenmu)))))
 
-(defun pyim-pinyin-valid-charpy-p (shenmu yunmu)
+(defun pyim-pinyin--valid-charpy-p (shenmu yunmu)
   "测试由 SHENMU 和 YUNMU 组成的拼音,是否是一个有效的汉字拼音。
 这个函数尊重 `pyim-pinyin-fuzzy-alist' 模糊音设置。"
   (cl-some
@@ -113,7 +113,7 @@
       (if (member yunmu pyim-pinyin--yunmu)
           (cond (;; 如果声母和韵母组成的拼音不是一个有效的拼音,
                  ;; 就继续缩短,如果是,就进一步检测。
-                 (not (pyim-pinyin-valid-charpy-p shenmu yunmu))
+                 (not (pyim-pinyin--valid-charpy-p shenmu yunmu))
                  (setq i (1- i))
                  (setq yunmu ""))
                 ((and (string< "" rest)
@@ -123,7 +123,7 @@
                       (member (substring yunmu -1) pyim-pinyin--shenmu)
                       ;; 截取得到的韵母如果去掉最后一个字符,还是有效的韵母
                       (member (substring yunmu 0 -1) pyim-pinyin--yunmu))
-                 (if (not (pyim-pinyin-valid-charpy-p shenmu (substring yunmu 
0 -1)))
+                 (if (not (pyim-pinyin--valid-charpy-p shenmu (substring yunmu 
0 -1)))
                      ;; 如果去掉韵母最后一个字符后,无法组成一个有效的拼音。
                      ;; 就不要缩短了。
                      (setq i 0)
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 49432eb9ad..63d849ac03 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -309,12 +309,12 @@
   (should (equal (pyim-pinyin--get-shenmu "")
                  '(nil . "")))
 
-  ;; pyim-pinyin-valid-charpy-p
-  (should (pyim-pinyin-valid-charpy-p "n" "i"))
-  (should (pyim-pinyin-valid-charpy-p "" "a"))
-  (should (pyim-pinyin-valid-charpy-p "" "ao"))
-  (should-not (pyim-pinyin-valid-charpy-p "n" "k"))
-  (should-not (pyim-pinyin-valid-charpy-p "a" "k"))
+  ;; pyim-pinyin--valid-charpy-p
+  (should (pyim-pinyin--valid-charpy-p "n" "i"))
+  (should (pyim-pinyin--valid-charpy-p "" "a"))
+  (should (pyim-pinyin--valid-charpy-p "" "ao"))
+  (should-not (pyim-pinyin--valid-charpy-p "n" "k"))
+  (should-not (pyim-pinyin--valid-charpy-p "a" "k"))
 
   ;; pyim-pinyin-get-charpy
   (should (equal (pyim-pinyin-get-charpy "nihao")



reply via email to

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