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

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

[elpa] externals/pyim 78cc48c71e 1/2: * pyim-dhashcache.el (pyim-dhashca


From: ELPA Syncer
Subject: [elpa] externals/pyim 78cc48c71e 1/2: * pyim-dhashcache.el (pyim-dhashcache-delete-word): remove word from ishortcode2word.
Date: Sat, 1 Jan 2022 01:57:49 -0500 (EST)

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

    * pyim-dhashcache.el (pyim-dhashcache-delete-word): remove word from 
ishortcode2word.
---
 pyim-dhashcache.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/pyim-dhashcache.el b/pyim-dhashcache.el
index dab9be1ff4..40766bd956 100644
--- a/pyim-dhashcache.el
+++ b/pyim-dhashcache.el
@@ -451,6 +451,15 @@ code 对应的中文词条了。
              (puthash key new-value pyim-dhashcache-icode2word)
            (remhash key pyim-dhashcache-icode2word)))))
    pyim-dhashcache-icode2word)
+  (maphash
+   (lambda (key value)
+     (when (member word value)
+       (print value)
+       (let ((new-value (remove word value)))
+         (if new-value
+             (puthash key new-value pyim-dhashcache-ishortcode2word)
+           (remhash key pyim-dhashcache-ishortcode2word)))))
+   pyim-dhashcache-ishortcode2word)
   (remhash word pyim-dhashcache-iword2count))
 
 (defun pyim-dhashcache-insert-word-into-icode2word (word code prepend)



reply via email to

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