branch: externals/pyim commit f5f1be270feb3cade25e9ef910bd58e442e4b016 Author: Feng Shu <tuma...@163.com> Commit: Feng Shu <tuma...@163.com>
when-let -> when-let* --- pyim-cstring.el | 10 +++++----- pyim-pymap.el | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pyim-cstring.el b/pyim-cstring.el index f674756918..127b3b808a 100644 --- a/pyim-cstring.el +++ b/pyim-cstring.el @@ -122,11 +122,11 @@ BUG: 当 STRING 中包含其它标点符号,并且设置 SEPERATER 时,结 如果 STR 不包含中文,不做特殊处理。" (if (pyim-string-match-p "\\cc" str) - (when-let ((code (cl-find-if-not - (lambda (c) - ;; 注意:Pinyin 词库中不包含 "/" 字符。 - (string-match-p c "/")) - (pyim-dcache-get str '(word2code))))) + (when-let* ((code (cl-find-if-not + (lambda (c) + ;; 注意:Pinyin 词库中不包含 "/" 字符。 + (string-match-p c "/")) + (pyim-dcache-get str '(word2code))))) (split-string code "-")) (list str))) diff --git a/pyim-pymap.el b/pyim-pymap.el index a60a1e3c60..a6fb6de20d 100644 --- a/pyim-pymap.el +++ b/pyim-pymap.el @@ -1188,10 +1188,10 @@ pyim 在特定的时候需要读取一个汉字的拼音,这个工作由此完 4. 返回结果: hang" (cl-find-if (lambda (pinyin) - (when-let ((x (string-join - (pyim-pymap--py2duoyinzi-get - pinyin search-char) - "-"))) + (when-let* ((x (string-join + (pyim-pymap--py2duoyinzi-get + pinyin search-char) + "-"))) (cl-some (lambda (word) (and word (string-match-p word x)))