[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim 46eaaa937d 10/35: pyim-dhashcache-insert* -> pyim-
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pyim 46eaaa937d 10/35: pyim-dhashcache-insert* -> pyim-dhashcache--insert* |
Date: |
Fri, 24 Jun 2022 08:58:06 -0400 (EDT) |
branch: externals/pyim
commit 46eaaa937d7874accd31dc9cbe7c233a1a6af959
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
pyim-dhashcache-insert* -> pyim-dhashcache--insert*
---
pyim-dhashcache.el | 18 +++++++++---------
tests/pyim-tests.el | 16 ++++++++--------
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/pyim-dhashcache.el b/pyim-dhashcache.el
index eb446e3d26..f8ea51cc6d 100644
--- a/pyim-dhashcache.el
+++ b/pyim-dhashcache.el
@@ -139,13 +139,13 @@
"将词条 WORD 插入到下面两个词库缓存中。
1. `pyim-dhashcache-icode2word'
-2. `pyim-dhashcache-insert-word-into-ishortcode2word'."
- (pyim-dhashcache-insert-word-into-icode2word word code prepend)
+2. `pyim-dhashcache--insert-word-into-ishortcode2word'."
+ (pyim-dhashcache--insert-word-into-icode2word word code prepend)
;; NOTE: 保存词条到 icode2word 词库缓存的同时,也在 ishortcode2word 词库缓存中
;; 临时写入一份,供当前 Emacs session 使用,但退出时 pyim 不会保存
;; ishortcode2word 词库缓存到文件,因为下次启动 Emacs 的时候,ishortcode2word
;; 词库缓存会从 icode2word 再次重建。
- (pyim-dhashcache-insert-word-into-ishortcode2word word code prepend))
+ (pyim-dhashcache--insert-word-into-ishortcode2word word code prepend))
(defmacro pyim-dhashcache--put (cache code &rest body)
"将 BODY 的返回值保存到 CACHE 对应的 CODE 中。
@@ -163,18 +163,18 @@
(setq ,new-value (progn ,@body))
(puthash ,key ,new-value ,table))))
-(defun pyim-dhashcache-insert-word-into-icode2word (word code prepend)
+(defun pyim-dhashcache--insert-word-into-icode2word (word code prepend)
"将词条 WORD 插入到 icode2word 词库缓存 CODE 键对应的位置.
默认 WORD 放到已有词条的最后,如果 PREPEND 为 non-nil, WORD 将放
到已有词条的最前面。"
(pyim-dhashcache--put
- pyim-dhashcache-icode2word code
- (if prepend
- `(,word ,@(remove word orig-value))
- `(,@(remove word orig-value) ,word))))
+ pyim-dhashcache-icode2word code
+ (if prepend
+ `(,word ,@(remove word orig-value))
+ `(,@(remove word orig-value) ,word))))
-(defun pyim-dhashcache-insert-word-into-ishortcode2word (word code prepend)
+(defun pyim-dhashcache--insert-word-into-ishortcode2word (word code prepend)
"将词条 WORD 插入到 ishortcode2word 词库缓存 CODE 首字母字符串对应的位置.
默认 WORD 放到已有词条的最后,如果 PREPEND 为 non-nil, WORD 将放
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 1a183224c0..cf5fa78410 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -1387,19 +1387,19 @@ yin-xing 因行
(should (equal (pyim-dcache-get "ni-hao" '(code2word icode2word)) '("你好"
"呢耗")))
(should (equal (pyim-dcache-get "ni-hao") '("呢耗" "你好")))))
-(ert-deftest pyim-tests-pyim-dhashcache-insert-word-into-icode2word ()
+(ert-deftest pyim-tests-pyim-dhashcache--insert-word-into-icode2word ()
(let ((pyim-dhashcache-icode2word (make-hash-table :test #'equal)))
- (pyim-dhashcache-insert-word-into-icode2word "你好" "ni-hao" t)
- (pyim-dhashcache-insert-word-into-icode2word "你耗" "ni-hao" t)
- (pyim-dhashcache-insert-word-into-icode2word "你豪" "ni-hao" nil)
+ (pyim-dhashcache--insert-word-into-icode2word "你好" "ni-hao" t)
+ (pyim-dhashcache--insert-word-into-icode2word "你耗" "ni-hao" t)
+ (pyim-dhashcache--insert-word-into-icode2word "你豪" "ni-hao" nil)
(should (equal (gethash "ni-hao" pyim-dhashcache-icode2word)
'("你耗" "你好" "你豪")))))
-(ert-deftest pyim-tests-pyim-dhashcache-insert-word-into-ishortcode2word ()
+(ert-deftest pyim-tests-pyim-dhashcache--insert-word-into-ishortcode2word ()
(let ((pyim-dhashcache-ishortcode2word (make-hash-table :test #'equal)))
- (pyim-dhashcache-insert-word-into-ishortcode2word "你好" "ni-hao" t)
- (pyim-dhashcache-insert-word-into-ishortcode2word "你慌" "ni-huang" t)
- (pyim-dhashcache-insert-word-into-ishortcode2word "你坏" "ni-huai" nil)
+ (pyim-dhashcache--insert-word-into-ishortcode2word "你好" "ni-hao" t)
+ (pyim-dhashcache--insert-word-into-ishortcode2word "你慌" "ni-huang" t)
+ (pyim-dhashcache--insert-word-into-ishortcode2word "你坏" "ni-huai" nil)
(should (equal (gethash "n-h" pyim-dhashcache-ishortcode2word)
'("你慌" "你好" "你坏")))))
- [elpa] externals/pyim 4a3a27fe54 09/35: pyim-dhashcache-put -> pyim-dhashcache--put, (continued)
- [elpa] externals/pyim 4a3a27fe54 09/35: pyim-dhashcache-put -> pyim-dhashcache--put, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 8f195d4efe 19/35: pyim-dregcache- -> pyim-dregcache--, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 93e54a0783 23/35: pyim-process-candidates-last -> pyim-process--candidates-last, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim e264cbe5f5 02/35: pyim-preview-delete-overlay -> pyim-preview--delete-overlay, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 3454118ea9 08/35: pyim-dhashcache-init* -> pyim-dhashcache--init*, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 91ffc476b8 11/35: pyim-dhashcache-get* -> pyim-dhashcache--get*, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim e5920bae41 28/35: pyim-process-auto-select -> pyim-process--auto-select, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 93b372c8f9 01/35: pyim-preview-setup-overlay -> pyim-preview--setup-overlay, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 73ee676657 04/35: pyim-preview-delete-string -> pyim-preview--delete-string, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 9a6073f5f4 17/35: pyim-dhashcache-pinyin-string< -> pyim-dhashcache--pinyin-string<, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 46eaaa937d 10/35: pyim-dhashcache-insert* -> pyim-dhashcache--insert*,
ELPA Syncer <=
- [elpa] externals/pyim d8f2e8b6d6 18/35: Add comment to pyim-dhashcache.el, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 1aeddb6172 33/35: pyim-process-merge-candidates -> pyim-process--merge-candidates, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim d42cc01d44 13/35: pyim-dhashcache-calculate-priority -> pyim-dhashcache--calculate-priority, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim d247ac664e 03/35: pyim-preview-refresh -> pyim-preview--refresh, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim b4f252016c 16/35: pyim-dhashcache-export* -> pyim-dhashcache--export*, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 9da901bf0f 15/35: pyim-dhashcache-save* -> pyim-dhashcache--save*, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 4005949cce 21/35: pyim-process-run-delay-timer -> pyim-process--run-delay-timer, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 461b9bcc0a 22/35: pyim-process-imobjs -> pyim-process--imobjs, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 30bc394852 25/35: pyim-process-candidates -> pyim-process--candidates, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim b49d1348de 31/35: pyim-process-run-delay -> pyim-process--run-delay, ELPA Syncer, 2022/06/24