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

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

[elpa] externals/pyim a86cb9b606 47/58: pyim-pinyin-get-shenmu -> pyim-p


From: ELPA Syncer
Subject: [elpa] externals/pyim a86cb9b606 47/58: pyim-pinyin-get-shenmu -> pyim-pinyin--get-shenmu
Date: Fri, 24 Jun 2022 06:57:55 -0400 (EDT)

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

    pyim-pinyin-get-shenmu -> pyim-pinyin--get-shenmu
---
 pyim-pinyin.el      | 6 +++---
 tests/pyim-tests.el | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/pyim-pinyin.el b/pyim-pinyin.el
index 723a23eb24..bd856701a1 100644
--- a/pyim-pinyin.el
+++ b/pyim-pinyin.el
@@ -76,7 +76,7 @@
 因为用户有即时界面反馈,不可能连续输入无效拼音.")
 
 ;; 分解拼音的相关函数
-(defun pyim-pinyin-get-shenmu (pinyin)
+(defun pyim-pinyin--get-shenmu (pinyin)
   "从一个拼音字符串 PINYIN 中提出第一个声母。"
   (let ((i (min (length pinyin) 2))
         shenmu)
@@ -102,7 +102,7 @@
 
 (defun pyim-pinyin-get-charpy (pinyin)
   "将拼音字符串 PINYIN 分解成声母,韵母和剩余部分."
-  (let* ((x (pyim-pinyin-get-shenmu pinyin))
+  (let* ((x (pyim-pinyin--get-shenmu pinyin))
          (shenmu (car x))
          (yunmu-and-rest (cdr x))
          (i (min (length yunmu-and-rest) 5))
@@ -118,7 +118,7 @@
                  (setq yunmu ""))
                 ((and (string< "" rest)
                       ;; 截取后剩余的字符串 rest 找不出声母
-                      (equal (car (pyim-pinyin-get-shenmu rest)) "")
+                      (equal (car (pyim-pinyin--get-shenmu rest)) "")
                       ;; 截取后的韵母最后一个字符是一个有效声母
                       (member (substring yunmu -1) pyim-pinyin--shenmu)
                       ;; 截取得到的韵母如果去掉最后一个字符,还是有效的韵母
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index d606d5b6fd..49432eb9ad 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -301,12 +301,12 @@
 
 ;; ** pyim-pinyin 相关单元测试
 (ert-deftest pyim-tests-pyim-pinyin ()
-  ;; pyim-pinyin-get-shenmu
-  (should (equal (pyim-pinyin-get-shenmu "nihao")
+  ;; pyim-pinyin--get-shenmu
+  (should (equal (pyim-pinyin--get-shenmu "nihao")
                  '("n" . "ihao")))
-  (should (equal (pyim-pinyin-get-shenmu "ao")
+  (should (equal (pyim-pinyin--get-shenmu "ao")
                  '("" . "ao")))
-  (should (equal (pyim-pinyin-get-shenmu "")
+  (should (equal (pyim-pinyin--get-shenmu "")
                  '(nil . "")))
 
   ;; pyim-pinyin-valid-charpy-p



reply via email to

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