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

[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)
                    '("你慌" "你好" "你坏")))))
 



reply via email to

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