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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/pyim 4a78f35 6/6: * pyim-dcache.el (pyim-dcache-create-


From: ELPA Syncer
Subject: [elpa] externals/pyim 4a78f35 6/6: * pyim-dcache.el (pyim-dcache-create-dicts-md5): Simplify.
Date: Tue, 14 Dec 2021 00:57:31 -0500 (EST)

branch: externals/pyim
commit 4a78f358e6f6c036a1e0e520af3127525222a878
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>

    * pyim-dcache.el (pyim-dcache-create-dicts-md5): Simplify.
---
 pyim-dcache.el | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/pyim-dcache.el b/pyim-dcache.el
index 4223664..dbd71f4 100644
--- a/pyim-dcache.el
+++ b/pyim-dcache.el
@@ -216,12 +216,13 @@ non-nil,文件存在时将会提示用户是否覆盖,默认为覆盖模式"
       (pyim-dcache-call-api 'update-code2word dict-files dicts-md5 force))))
 
 (defun pyim-dcache-create-dicts-md5 (dict-files)
-  (let* ((version "v1") ;当需要强制更新 dict 缓存时,更改这个字符串。
-         (dicts-md5 (md5 (prin1-to-string
-                          (mapcar (lambda (file)
-                                    (list version file (nth 5 (file-attributes 
file 'string))))
-                                  dict-files)))))
-    dicts-md5))
+  "为 DICT-FILES 生成 md5 字符串。"
+  ;;当需要强制更新 dict 缓存时,更改这个字符串。
+  (let ((version "v1"))
+    (md5 (prin1-to-string
+          (mapcar (lambda (file)
+                    (list version file (nth 5 (file-attributes file 'string))))
+                  dict-files)))))
 
 (defun pyim-dcache-update-wordcount (word &optional prepend wordcount-handler)
   "保存词频到缓存."



reply via email to

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