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

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

[elpa] externals/pyim 1b5c7a8ac7 07/58: pyim-cregexp-create-cregexp-from


From: ELPA Syncer
Subject: [elpa] externals/pyim 1b5c7a8ac7 07/58: pyim-cregexp-create-cregexp-from-string -> pyim-cregexp--create-cregexp-from-string
Date: Fri, 24 Jun 2022 06:57:52 -0400 (EDT)

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

    pyim-cregexp-create-cregexp-from-string -> 
pyim-cregexp--create-cregexp-from-string
---
 pyim-cregexp.el     | 8 ++++----
 tests/pyim-tests.el | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/pyim-cregexp.el b/pyim-cregexp.el
index e23085f092..bf6f2eb01a 100644
--- a/pyim-cregexp.el
+++ b/pyim-cregexp.el
@@ -138,7 +138,7 @@ regexp, 所以搜索单字的时候一般可以搜到生僻字,但搜索句子
          (pyim-cregexp--create-cregexp-from-rx
           (lambda (x)
             (if (stringp x)
-                (xr (pyim-cregexp-create-cregexp-from-string
+                (xr (pyim-cregexp--create-cregexp-from-string
                      x scheme char-level-num chinese-only))
               x))
           (xr string))))
@@ -155,13 +155,13 @@ regexp, 所以搜索单字的时候一般可以搜到生僻字,但搜索句子
              rx-form))
     (_ (funcall fn rx-form))))
 
-(defun pyim-cregexp-create-cregexp-from-string
+(defun pyim-cregexp--create-cregexp-from-string
     (string scheme &optional char-level-num chinese-only)
   (let* ((char-level-num (pyim-cregexp--char-level-num char-level-num))
          (string-list (pyim-cregexp-split-string string)))
     ;; 确保 pyim 词库加载
     (pyim-dcache-init-variables)
-    (pyim-cregexp-create-cregexp-from-string-list
+    (pyim-cregexp--create-cregexp-from-string-list
      string-list scheme char-level-num chinese-only)))
 
 (defun pyim-cregexp-split-string (string)
@@ -171,7 +171,7 @@ regexp, 所以搜索单字的时候一般可以搜到生僻字,但搜索句子
                  "\\([a-z]+'*\\)" (concat sep "\\1" sep) string)
                 sep))))
 
-(defun pyim-cregexp-create-cregexp-from-string-list
+(defun pyim-cregexp--create-cregexp-from-string-list
     (string-list scheme &optional char-level-num chinese-only)
   (mapconcat
    (lambda (string)
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 46322e6374..8b40a275c2 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -986,8 +986,8 @@
 
   (let* ((str (nth 2 (split-string (car (pyim-pymap-py2cchar-get "wang" t)) 
"|")))
          (quanpin (pyim-scheme-get 'quanpin))
-         (regexp1 (pyim-cregexp-create-cregexp-from-string "wang" quanpin 3 
nil))
-         (regexp2 (pyim-cregexp-create-cregexp-from-string "wang" quanpin 2)))
+         (regexp1 (pyim-cregexp--create-cregexp-from-string "wang" quanpin 3 
nil))
+         (regexp2 (pyim-cregexp--create-cregexp-from-string "wang" quanpin 2)))
     (should (string-match-p regexp1 str))
     (should-not (string-match-p regexp2 str)))
 
@@ -1009,7 +1009,7 @@
     (should (equal (pyim-cregexp-build "adww") 
"\\(?:adww\\|[其匧惹斯欺歁莢蒙][人古]?人?\\)"))
     (should (equal (pyim-cregexp-build "aaaa'aaaa")
                    
"\\(?:\\(?:aaaa'\\|aaaa\\|[工恭]恭?敬?敬?\\)\\(?:aaaa\\|[工恭]恭?敬?敬?\\)\\)"))
-    (should (equal (pyim-cregexp-create-cregexp-from-string "aaaa'aaaa" wubi)
+    (should (equal (pyim-cregexp--create-cregexp-from-string "aaaa'aaaa" wubi)
                    
"\\(?:aaaa'\\|aaaa\\|[工恭][恭]?[敬]?[敬]?\\)\\(?:aaaa\\|[工恭][恭]?[敬]?[敬]?\\)"))
     (should (equal (pyim-cregexp-build-xingma-regexp-from-words '("工" "恭恭敬敬"))
                    "[工恭][恭]?[敬]?[敬]?"))



reply via email to

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