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

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

[elpa] externals/pyim 1d2cb57: pyim-dcache-get-value and pyim-dcache-sav


From: ELPA Syncer
Subject: [elpa] externals/pyim 1d2cb57: pyim-dcache-get-value and pyim-dcache-save-variable use url-hexify-string.
Date: Tue, 14 Dec 2021 21:57:34 -0500 (EST)

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

    pyim-dcache-get-value and pyim-dcache-save-variable use url-hexify-string.
    
        * pyim-dhashcache.el: remove comment.
    
        * pyim-dcache.el (pyim-dcache-get-value)
        (pyim-dcache-save-variable): use url-hexify-string.
        (url-util): required.
---
 pyim-dcache.el     | 5 +++--
 pyim-dhashcache.el | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pyim-dcache.el b/pyim-dcache.el
index 8fb5cfa..e4361f4 100644
--- a/pyim-dcache.el
+++ b/pyim-dcache.el
@@ -30,6 +30,7 @@
 (require 'cl-lib)
 (require 'pyim-common)
 (require 'pyim-dict)
+(require 'url-util)
 
 (defgroup pyim-dcache nil
   "Dcache for pyim."
@@ -102,13 +103,13 @@ dcache 文件的方法让 pyim 正常工作。")
 
 (defun pyim-dcache-get-value (variable)
   "从 `pyim-dcache-directory' 中读取与 VARIABLE 对应的文件中保存的值."
-  (let ((file (expand-file-name (symbol-name variable)
+  (let ((file (expand-file-name (url-hexify-string (symbol-name variable))
                                 pyim-dcache-directory)))
     (pyim-dcache-get-value-from-file file)))
 
 (defun pyim-dcache-save-variable (variable value)
   "将 VARIABLE 变量的取值保存到 `pyim-dcache-directory' 中对应文件中."
-  (let ((file (expand-file-name (symbol-name variable)
+  (let ((file (expand-file-name (url-hexify-string (symbol-name variable))
                                 pyim-dcache-directory)))
     (pyim-dcache-save-value-to-file value file)))
 
diff --git a/pyim-dhashcache.el b/pyim-dhashcache.el
index c6fa6ea..091b9ad 100644
--- a/pyim-dhashcache.el
+++ b/pyim-dhashcache.el
@@ -40,7 +40,6 @@
 (require 'pyim-dcache)
 (require 'pyim-scheme)
 
-;; Pyim 词库缓存文件,注意:变量名称中不能出现 ":" 等,不能作为文件名称的字符。
 (defvar pyim-dhashcache-code2word nil)
 (defvar pyim-dhashcache-code2word-md5 nil)
 (defvar pyim-dhashcache-word2code nil)



reply via email to

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