branch: externals/pyim
commit c77996088452a51957fb78ed000b303ba643544d
Author: Feng Shu <tuma...@163.com>
Commit: Feng Shu <tuma...@163.com>

    iword2count-recent* -> iword2count-recent-*-items
    
            * pyim-dregcache.el (pyim-dregcache-get):
    
            * pyim-dhashcache.el (pyim-dhashcache-iword2count-recent1)
            (pyim-dhashcache-init-count-and-priority-variables)
            (pyim-dhashcache-update-iword2count):
    
            * pyim-dregcache.el (pyim-dregcache-get):
    
            * pyim-candidates.el (pyim-candidates-get-chief):
---
 pyim-candidates.el |  4 ++--
 pyim-dhashcache.el | 16 ++++++++--------
 pyim-dregcache.el  |  8 ++++----
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/pyim-candidates.el b/pyim-candidates.el
index c6652b4e15..7311afd0cd 100644
--- a/pyim-candidates.el
+++ b/pyim-candidates.el
@@ -86,12 +86,12 @@ IMOBJS 获得候选词条。"
               ;; 最近输入的10个不同的词中出现一次以上。
               (cl-find-if
                (lambda (word)
-                 (> (or (car (pyim-dcache-get word '(iword2count-recent1))) 0) 
1))
+                 (> (or (car (pyim-dcache-get word 
'(iword2count-recent-10-words))) 0) 1))
                personal-words)
               ;; 最近输入的50个不同的词中出现过三次以上。
               (cl-find-if
                (lambda (word)
-                 (> (or (car (pyim-dcache-get word '(iword2count-recent2))) 0) 
3))
+                 (> (or (car (pyim-dcache-get word 
'(iword2count-recent-50-words))) 0) 3))
                personal-words)
               ;; 个人词条中的第一个词。
               (car personal-words))))))
diff --git a/pyim-dhashcache.el b/pyim-dhashcache.el
index a7be424a24..6b939d255d 100644
--- a/pyim-dhashcache.el
+++ b/pyim-dhashcache.el
@@ -67,8 +67,8 @@
 (defvar pyim-dhashcache-word2code nil)
 (defvar pyim-dhashcache-iword2count nil)
 (defvar pyim-dhashcache-iword2count-log nil)
-(defvar pyim-dhashcache-iword2count-recent1 nil)
-(defvar pyim-dhashcache-iword2count-recent2 nil)
+(defvar pyim-dhashcache-iword2count-recent-10-words nil)
+(defvar pyim-dhashcache-iword2count-recent-50-words nil)
 ;; 注意事项: 在 pyim 中,优先级是多个数字组成的列表,而不是单个数字。
 (defvar pyim-dhashcache-iword2priority nil)
 (defvar pyim-dhashcache-shortcode2word nil)
@@ -497,8 +497,8 @@ code 对应的中文词条了。
   "初始化 count 相关的变量。"
   (pyim-dcache-init-variable pyim-dhashcache-iword2count)
   (pyim-dcache-init-variable pyim-dhashcache-iword2count-log)
-  (pyim-dcache-init-variable pyim-dhashcache-iword2count-recent1)
-  (pyim-dcache-init-variable pyim-dhashcache-iword2count-recent2)
+  (pyim-dcache-init-variable pyim-dhashcache-iword2count-recent-10-words)
+  (pyim-dcache-init-variable pyim-dhashcache-iword2count-recent-50-words)
   (pyim-dcache-init-variable pyim-dhashcache-iword2priority))
 
 (defun pyim-dhashcache-save-personal-dcache-to-file ()
@@ -555,13 +555,13 @@ code 对应的中文词条了。
 (defun pyim-dhashcache-update-iword2count (word &optional wordcount-handler)
   "保存词频到缓存."
   ;; 更新最近输入 10 个词条的 count 表
-  (setq pyim-dhashcache-iword2count-recent1
+  (setq pyim-dhashcache-iword2count-recent-10-words
         (pyim-dhashcache-update-iword2count-recent
-         word 10 pyim-dhashcache-iword2count-recent1))
+         word 10 pyim-dhashcache-iword2count-recent-10-words))
   ;; 更新最近输入 50 个词条的 count 表
-  (setq pyim-dhashcache-iword2count-recent2
+  (setq pyim-dhashcache-iword2count-recent-50-words
         (pyim-dhashcache-update-iword2count-recent
-         word 50 pyim-dhashcache-iword2count-recent2))
+         word 50 pyim-dhashcache-iword2count-recent-50-words))
   ;; 更新总 count 表
   (pyim-dhashcache-put
     pyim-dhashcache-iword2count word
diff --git a/pyim-dregcache.el b/pyim-dregcache.el
index 056aeaa8d4..c7142c84c9 100644
--- a/pyim-dregcache.el
+++ b/pyim-dregcache.el
@@ -285,10 +285,10 @@ DICT-FILES 是词库文件列表. DICTS-MD5 是词库的MD5校验码.
   (cond ((or (memq 'icode2word from)
              (memq 'ishortcode2word from))
          (pyim-dregcache-get-icode2word-ishortcode2word code))
-        ;; FIXME: pyim-dregcache 暂时不支持 iword2count-recent1 和
-        ;; iword2count-recent2.
-        ((or (memq 'iword2count-recent1 from)
-             (memq 'iword2count-recent2 from))
+        ;; FIXME: pyim-dregcache 暂时不支持 iword2count-recent-10-words 和
+        ;; iword2count-recent-50-words.
+        ((or (memq 'iword2count-recent-10-words from)
+             (memq 'iword2count-recent-50-words from))
          nil)
         (t (let ((dict-files (pyim-dregcache-all-dict-files))
                  result)

Reply via email to