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

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

[elpa] externals/pyim 91b1aa37da 11/58: pyim-cregexp-build-xingma-regexp


From: ELPA Syncer
Subject: [elpa] externals/pyim 91b1aa37da 11/58: pyim-cregexp-build-xingma-regexp-from-words -> pyim-cregexp--build-xingma-regexp-from-words
Date: Fri, 24 Jun 2022 06:57:52 -0400 (EDT)

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

    pyim-cregexp-build-xingma-regexp-from-words -> 
pyim-cregexp--build-xingma-regexp-from-words
---
 pyim-cregexp.el     | 4 ++--
 tests/pyim-tests.el | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pyim-cregexp.el b/pyim-cregexp.el
index e87584c175..e8604dc317 100644
--- a/pyim-cregexp.el
+++ b/pyim-cregexp.el
@@ -260,13 +260,13 @@ regexp, 所以搜索单字的时候一般可以搜到生僻字,但搜索句子
                                         (if first-equal
                                             (substring x 0 1)
                                           x))))
-                      (pyim-cregexp-build-xingma-regexp-from-words
+                      (pyim-cregexp--build-xingma-regexp-from-words
                        (pyim-dcache-get code '(code2word)))))
                   imobj "")))
     (unless (equal regexp "")
       (concat (if match-beginning "^" "") regexp))))
 
-(defun pyim-cregexp-build-xingma-regexp-from-words (words)
+(defun pyim-cregexp--build-xingma-regexp-from-words (words)
   "根据 WORDS, 创建一个可以搜索这些 WORDS 的 regexp.
 
 比如:工, 恭恭敬敬 => [工恭][恭]?[敬]?[敬]?
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 1aa4066b5b..8eb8f7f643 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -1011,7 +1011,7 @@
                    
"\\(?:\\(?:aaaa'\\|aaaa\\|[工恭]恭?敬?敬?\\)\\(?:aaaa\\|[工恭]恭?敬?敬?\\)\\)"))
     (should (equal (pyim-cregexp--create-cregexp-from-string "aaaa'aaaa" wubi)
                    
"\\(?:aaaa'\\|aaaa\\|[工恭][恭]?[敬]?[敬]?\\)\\(?:aaaa\\|[工恭][恭]?[敬]?[敬]?\\)"))
-    (should (equal (pyim-cregexp-build-xingma-regexp-from-words '("工" "恭恭敬敬"))
+    (should (equal (pyim-cregexp--build-xingma-regexp-from-words '("工" "恭恭敬敬"))
                    "[工恭][恭]?[敬]?[敬]?"))
     )
 



reply via email to

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