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

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

[elpa] externals/pyim 5458e8d0f4: * pyim-dhashcache.el (pyim-dhashcache-


From: ELPA Syncer
Subject: [elpa] externals/pyim 5458e8d0f4: * pyim-dhashcache.el (pyim-dhashcache-generate-word2code-dcache-file): Make the content saved beautiful.
Date: Sun, 5 Jun 2022 23:57:47 -0400 (EDT)

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

    * pyim-dhashcache.el (pyim-dhashcache-generate-word2code-dcache-file): Make 
the content saved beautiful.
---
 pyim-dhashcache.el | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/pyim-dhashcache.el b/pyim-dhashcache.el
index ee3fb98dd3..59ab03840a 100644
--- a/pyim-dhashcache.el
+++ b/pyim-dhashcache.el
@@ -326,7 +326,16 @@ DCACHE 是一个 code -> words 的 hashtable.
        (lambda (code words)
          (unless (pyim-string-match-p "-" code)
            (dolist (word words)
-             (let ((value (gethash word hashtable)))
+             (let ((value (gethash word hashtable))
+                   ;; NOTE: 这里使用 `cl-copy-seq', 可以让保存的文件内容类似:
+                   ;;
+                   ;;   "呵" ("he" "a")
+                   ;;
+                   ;; 而不是:
+                   ;;
+                   ;;   "呵" (#9="he" #2#)
+                   ;;
+                   (code (cl-copy-seq code)))
                (puthash word
                         (if value
                             `(,code ,@value)



reply via email to

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