[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim 894e4cd5e1 43/58: Remove pyim-pinyin-build-regexp
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pyim 894e4cd5e1 43/58: Remove pyim-pinyin-build-regexp |
Date: |
Fri, 24 Jun 2022 06:57:55 -0400 (EDT) |
branch: externals/pyim
commit 894e4cd5e1691917f22841556254fd5d361aa704
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
Remove pyim-pinyin-build-regexp
---
pyim-pinyin.el | 20 --------------------
tests/pyim-tests.el | 13 +------------
2 files changed, 1 insertion(+), 32 deletions(-)
diff --git a/pyim-pinyin.el b/pyim-pinyin.el
index 41bef56abf..c313ebd463 100644
--- a/pyim-pinyin.el
+++ b/pyim-pinyin.el
@@ -75,26 +75,6 @@
但同时产生了无效拼音 king . 用户手动输入的无效拼音无需考虑.
因为用户有即时界面反馈,不可能连续输入无效拼音.")
-(defun pyim-pinyin-build-regexp (pinyin &optional match-beginning first-equal
all-equal)
- "从 PINYIN 构建一个 regexp,用于搜索联想词,
-
-比如:ni-hao:
-1. ^ni-hao[a-z]* , when FIRST-EQUAL set to `t'
-2. ^ni[a-z]*-hao[a-z]* , when FIRST-EQUAL set to `nil'"
- (when (and pinyin (stringp pinyin))
- (let ((pinyin-list (split-string pinyin "-"))
- (count 0))
- (concat (if match-beginning "^" "")
- (mapconcat
- (lambda (x)
- (setq count (+ count 1))
- (if (or (not first-equal) (> count 1))
- (if all-equal
- x
- (concat x "[a-z]*"))
- x))
- pinyin-list "-")))))
-
;; 分解拼音的相关函数
(defun pyim-pinyin-get-shenmu (pinyin)
"从一个拼音字符串 PINYIN 中提出第一个声母。"
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 7aac821712..d606d5b6fd 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -371,18 +371,7 @@
'(("h" "eng" "h" "eng")
("h" "en" "h" "eng")
("f" "eng" "h" "eng")
- ("f" "en" "h" "eng")))))
- ;; pyim-pinyin-build-regexp
- (should (equal (pyim-pinyin-build-regexp "ni-hao")
- "ni[a-z]*-hao[a-z]*"))
- (should (equal (pyim-pinyin-build-regexp "ni-hao" t)
- "^ni[a-z]*-hao[a-z]*"))
- (should (equal (pyim-pinyin-build-regexp "ni-hao" nil t)
- "ni-hao[a-z]*"))
- (should (equal (pyim-pinyin-build-regexp "ni-hao" nil nil t)
- "ni-hao"))
- (should (equal (pyim-pinyin-build-regexp "ni-hao" t t)
- "^ni-hao[a-z]*")))
+ ("f" "en" "h" "eng"))))))
;; ** pyim-punctuation 相关单元测试
(ert-deftest pyim-tests-pyim-punctuation ()
- [elpa] externals/pyim 5a8be7f327 37/58: Sort pyim-indicator.el, (continued)
- [elpa] externals/pyim 5a8be7f327 37/58: Sort pyim-indicator.el, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 4f4f3c8098 38/58: pyim-liberime-scheme -> pyim-liberime--scheme, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim e64c0be9e2 20/58: pyim-candidates-jianpin-words -> pyim-candidates--jianpin-words, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 9e006e703d 21/58: pyim-candidates-search-buffer -> pyim-candidates--search-buffer, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 4bb3a611cc 24/58: pyim-local-variable-list -> pyim--local-variable-list, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 76f67a8d9c 27/58: pyim-kill-emacs-hook-function -> pyim--kill-emacs-hook-function, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 25a704da4b 28/58: pyim-input-method-1 -> pyim--input-method, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 37812896c5 34/58: pyim-indicator-revert-cursor-color -> pyim-indicator--revert-cursor-color, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 80c81b88cf 48/58: pyim-pinyin-valid-charpy-p -> pyim-pinyin--valid-charpy-p, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 70a2d9a754 51/58: Add pyim-pinyin-valid-shuangpin-p, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 894e4cd5e1 43/58: Remove pyim-pinyin-build-regexp,
ELPA Syncer <=
- [elpa] externals/pyim 578d096ba9 44/58: pyim-pinyin-shenmu -> pyim-pinyin--shenmu, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim aef2a941f3 05/58: pyim-cregexp-create-beautiful-cregexp-from-string -> pyim-cregexp--create-beautiful-cregexp-from-string, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim a86cb9b606 47/58: pyim-pinyin-get-shenmu -> pyim-pinyin--get-shenmu, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim c604b1f4aa 55/58: pyim-pymap-py2cchar-cache2 -> pyim-pymap--py2cchar-cache2, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim c0798d5e4d 57/58: pyim-pymap-cchar2py-cache -> pyim-pymap--cchar2py-cache, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim c573694ae4 58/58: Update pyim-pymap-utils.el, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim f4074fc4ef 04/58: pyim-cregexp-valid-p -> pyim-cregexp--valid-p, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 291798d23d 09/58: pyim-cregexp-scheme -> pyim-cregexp--scheme, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim b243e7e8e7 15/58: pyim-isearch-search-fun -> pyim-isearch--search-fun, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 56505723bc 16/58: pyim-autoselector-xingma-1 -> pyim-autoselector--xingma, ELPA Syncer, 2022/06/24