[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim 91ffc476b8 11/35: pyim-dhashcache-get* -> pyim-dha
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pyim 91ffc476b8 11/35: pyim-dhashcache-get* -> pyim-dhashcache--get* |
Date: |
Fri, 24 Jun 2022 08:58:06 -0400 (EDT) |
branch: externals/pyim
commit 91ffc476b89f2e12b200cc5034934a679c543074
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
pyim-dhashcache-get* -> pyim-dhashcache--get*
---
pyim-dhashcache.el | 24 ++++++++++++------------
tests/pyim-tests.el | 34 +++++++++++++++++-----------------
2 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/pyim-dhashcache.el b/pyim-dhashcache.el
index f8ea51cc6d..d20129f4a6 100644
--- a/pyim-dhashcache.el
+++ b/pyim-dhashcache.el
@@ -179,7 +179,7 @@
默认 WORD 放到已有词条的最后,如果 PREPEND 为 non-nil, WORD 将放
到已有词条的最前面。"
- (dolist (newcode (pyim-dhashcache-get-ishortcodes code))
+ (dolist (newcode (pyim-dhashcache--get-ishortcodes-ishortcodes code))
(pyim-dhashcache--put
pyim-dhashcache-ishortcode2word
newcode
@@ -187,7 +187,7 @@
`(,word ,@(remove word orig-value))
`(,@(remove word orig-value) ,word)))))
-(defun pyim-dhashcache-get-ishortcodes (code)
+(defun pyim-dhashcache--get-ishortcodes-ishortcodes (code)
"获取CODE 所有的简写 ishortcodes.
比如: ni-hao -> (n-h)
@@ -254,7 +254,7 @@
(lambda (key value)
(puthash key
(pyim-dhashcache-calculate-priority
- (pyim-dhashcache-get-counts-from-log
+ (pyim-dhashcache--get-ishortcodes-counts-from-log
value))
pyim-dhashcache-iword2priority))
pyim-dhashcache-iword2count-log)
@@ -290,7 +290,7 @@
factor))))
pyim-dhashcache-count-types))
-(defun pyim-dhashcache-get-counts-from-log (log-info &optional time)
+(defun pyim-dhashcache--get-ishortcodes-counts-from-log (log-info &optional
time)
"从 LOG-INFO 中获取所有的 count 值。
比如: ((day :20220205 10
@@ -372,7 +372,7 @@
(let ((ishortcode2word (make-hash-table :test #'equal)))
(maphash
(lambda (key value)
- (dolist (newkey (pyim-dhashcache-get-ishortcodes key))
+ (dolist (newkey (pyim-dhashcache--get-ishortcodes-ishortcodes key))
(puthash newkey
(delete-dups
`(,@(gethash newkey ishortcode2word)
@@ -393,9 +393,9 @@
如果 FORCE 为真,强制加载。"
(interactive)
- (let* ((code2word-file (pyim-dhashcache-get-path 'pyim-dhashcache-code2word))
- (word2code-file (pyim-dhashcache-get-path 'pyim-dhashcache-word2code))
- (code2word-md5-file (pyim-dhashcache-get-path
'pyim-dhashcache-code2word-md5)))
+ (let* ((code2word-file (pyim-dhashcache--get-ishortcodes-path
'pyim-dhashcache-code2word))
+ (word2code-file (pyim-dhashcache--get-ishortcodes-path
'pyim-dhashcache-word2code))
+ (code2word-md5-file (pyim-dhashcache--get-ishortcodes-path
'pyim-dhashcache-code2word-md5)))
(when (or force (and (not (equal dicts-md5
(pyim-dcache-get-value-from-file code2word-md5-file)))
(not pyim-dhashcache--update-code2word-running-p)))
(setq pyim-dhashcache--update-code2word-running-p t)
@@ -443,7 +443,7 @@ DCACHE 是一个 code -> words 的 hashtable.
dcache)
(pyim-dcache-save-value-to-file hashtable file))))
-(defun pyim-dhashcache-get-path (variable)
+(defun pyim-dhashcache--get-ishortcodes-path (variable)
"获取保存 VARIABLE 取值的文件的路径."
(when (symbolp variable)
(concat (file-name-as-directory pyim-dcache-directory)
@@ -506,7 +506,7 @@ pyim 使用的词库文件是简单的文本文件,编码 *强制* 为 \\='utf
(let ((shortcode2word (make-hash-table :test #'equal)))
(maphash
(lambda (key value)
- (dolist (x (pyim-dhashcache-get-shortcodes key))
+ (dolist (x (pyim-dhashcache--get-ishortcodes-shortcodes key))
(puthash x
(mapcar
(lambda (word)
@@ -528,7 +528,7 @@ pyim 使用的词库文件是简单的文本文件,编码 *强制* 为 \\='utf
shortcode2word)
shortcode2word))
-(defun pyim-dhashcache-get-shortcodes (code)
+(defun pyim-dhashcache--get-ishortcodes-shortcodes (code)
"获取 CODE 所有的 shortcodes.
比如:wubi/aaaa -> (wubi/aaa wubi/aa)
@@ -596,7 +596,7 @@ pyim 使用的词库文件是简单的文本文件,编码 *强制* 为 \\='utf
;; Fix warn
(ignore orig-value)
(pyim-dhashcache-calculate-priority
- (pyim-dhashcache-get-counts-from-log
+ (pyim-dhashcache--get-ishortcodes-counts-from-log
(gethash word pyim-dhashcache-iword2count-log)))))
(defun pyim-dhashcache--update-iword2count-recent (word n hash-table)
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index cf5fa78410..06f426ea64 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -1235,25 +1235,25 @@ wo-hao 我好
(should-not (pyim-dhashcache-pinyin-string< "你好" "你不好"))
)
-(ert-deftest pyim-tests-pyim-dhashcache-get-shortcodes ()
- (should (equal (pyim-dhashcache-get-shortcodes ".abcde") nil))
- (should (equal (pyim-dhashcache-get-shortcodes "wubi/abcde")
+(ert-deftest pyim-tests-pyim-dhashcache--get-ishortcodes-shortcodes ()
+ (should (equal (pyim-dhashcache--get-ishortcodes-shortcodes ".abcde") nil))
+ (should (equal (pyim-dhashcache--get-ishortcodes-shortcodes "wubi/abcde")
'("wubi/abcd" "wubi/abc" "wubi/ab")))
- (should (equal (pyim-dhashcache-get-shortcodes "abcde") nil))
- (should (equal (pyim-dhashcache-get-shortcodes "ni-hao") nil))
- (should (equal (pyim-dhashcache-get-shortcodes "") nil)))
+ (should (equal (pyim-dhashcache--get-ishortcodes-shortcodes "abcde") nil))
+ (should (equal (pyim-dhashcache--get-ishortcodes-shortcodes "ni-hao") nil))
+ (should (equal (pyim-dhashcache--get-ishortcodes-shortcodes "") nil)))
-(ert-deftest pyim-tests-pyim-dhashcache-get-ishortcodes ()
- (should (equal (pyim-dhashcache-get-ishortcodes "ni-hao") '("n-h")))
- (should (equal (pyim-dhashcache-get-ishortcodes "wubi/aaaa") nil))
- (should (equal (pyim-dhashcache-get-ishortcodes "ni") '("n")))
- (should (equal (pyim-dhashcache-get-ishortcodes "") nil)))
+(ert-deftest pyim-tests-pyim-dhashcache--get-ishortcodes-ishortcodes ()
+ (should (equal (pyim-dhashcache--get-ishortcodes-ishortcodes "ni-hao")
'("n-h")))
+ (should (equal (pyim-dhashcache--get-ishortcodes-ishortcodes "wubi/aaaa")
nil))
+ (should (equal (pyim-dhashcache--get-ishortcodes-ishortcodes "ni") '("n")))
+ (should (equal (pyim-dhashcache--get-ishortcodes-ishortcodes "") nil)))
-(ert-deftest pyim-tests-pyim-dhashcache-get-path ()
+(ert-deftest pyim-tests-pyim-dhashcache--get-ishortcodes-path ()
(let* ((dir (pyim-tests-make-temp-file t))
(pyim-dcache-directory dir))
- (should (equal (pyim-dhashcache-get-path 'hello) (expand-file-name "hello"
dir)))
- (should (equal (pyim-dhashcache-get-path "hello") nil))))
+ (should (equal (pyim-dhashcache--get-ishortcodes-path 'hello)
(expand-file-name "hello" dir)))
+ (should (equal (pyim-dhashcache--get-ishortcodes-path "hello") nil))))
(ert-deftest pyim-tests-pyim-dhashcache-generate-file ()
(let ((dist-file (pyim-tests-make-temp-file))
@@ -1371,7 +1371,7 @@ zuo-zuo-you-mang 作作有芒")
yin-xing 因行
")))))
-(ert-deftest pyim-tests-pyim-dhashcache-get ()
+(ert-deftest pyim-tests-pyim-dhashcache--get-ishortcodes ()
(let ((pyim-dcache-backend 'pyim-dhashcache)
(pyim-dhashcache-code2word (make-hash-table :test #'equal))
(pyim-dhashcache-icode2word (make-hash-table :test #'equal))
@@ -1415,8 +1415,8 @@ yin-xing 因行
(should (equal (pyim-dcache-sort-words words)
'("你好" "呢耗" "你豪")))))
-(ert-deftest pyim-tests-pyim-dhashcache-get-counts-from-log ()
- (should (member (pyim-dhashcache-get-counts-from-log
+(ert-deftest pyim-tests-pyim-dhashcache--get-ishortcodes-counts-from-log ()
+ (should (member (pyim-dhashcache--get-ishortcodes-counts-from-log
'((day :20220107 10
:20220106 6
:20220104 3
- [elpa] externals/pyim 80fdf32548 14/35: pyim-dhashcache-generate* -> pyim-dhashcache--generate*, (continued)
- [elpa] externals/pyim 80fdf32548 14/35: pyim-dhashcache-generate* -> pyim-dhashcache--generate*, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 2473b5be9b 24/35: pyim-process-candidate-position -> pyim-process--candidate-position, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 43b09cfcac 26/35: pyim-process-input-chinese-predicate-1 -> pyim-process--input-chinese-predicate-1, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 2c04245442 05/35: pyim-preview-start-point -> pyim-preview--start-point, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim fea5fe56e3 06/35: pyim-dhashcache-update* -> pyim-dhashcache--update*, ELPA Syncer, 2022/06/24
- [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 <=
- [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, 2022/06/24
- [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