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

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

[elpa] externals/pyim 1ea2f13 1/3: * pyim-dhashcache.el (pyim-dhashcache


From: ELPA Syncer
Subject: [elpa] externals/pyim 1ea2f13 1/3: * pyim-dhashcache.el (pyim-dhashcache-delete-word): Remove code if no words.
Date: Tue, 4 May 2021 19:57:11 -0400 (EDT)

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

    * pyim-dhashcache.el (pyim-dhashcache-delete-word): Remove code if no words.
---
 pyim-dhashcache.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/pyim-dhashcache.el b/pyim-dhashcache.el
index 830fcb5..1fc1a1d 100644
--- a/pyim-dhashcache.el
+++ b/pyim-dhashcache.el
@@ -415,8 +415,10 @@ code 对应的中文词条了。
   (maphash
    (lambda (key value)
      (when (member word value)
-       (puthash key (remove word value)
-                pyim-dhashcache-icode2word)))
+       (let ((new-value (remove word value)))
+         (if new-value
+             (puthash key new-value pyim-dhashcache-icode2word)
+           (remhash key pyim-dhashcache-icode2word)))))
    pyim-dhashcache-icode2word)
   (remhash word pyim-dhashcache-iword2count))
 



reply via email to

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