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

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

[elpa] externals/pyim 46b94dfbea 17/22: Add pyim-punctuation-escape-p


From: ELPA Syncer
Subject: [elpa] externals/pyim 46b94dfbea 17/22: Add pyim-punctuation-escape-p
Date: Fri, 24 Jun 2022 16:57:52 -0400 (EDT)

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

    Add pyim-punctuation-escape-p
---
 pyim-process.el     | 8 ++------
 pyim-punctuation.el | 2 ++
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/pyim-process.el b/pyim-process.el
index 807d88f0b9..31450e1ed1 100644
--- a/pyim-process.el
+++ b/pyim-process.el
@@ -693,12 +693,8 @@ alist 列表。"
      ;; 2. item2
      ;; 3. item3
 
-     ;; 在这种情况下,数字后面输入句号必须是半角句号而不是全角句号,
-     ;; pyim 调用 `pyim-process-outcome-handle-char' 时,会检测光标前面的字符,如果这个
-     ;; 字符属于 `pyim-punctuation-escape-list' ,pyim 将输入半角标点,
-     ;; 具体细节见:`pyim-process-outcome-handle-char'
-     ((member (char-before)
-              pyim-punctuation-escape-list)
+     ;; 在这种情况下,数字后面输入句号必须是半角句号而不是全角句号。
+     ((pyim-punctuation-escape-p (char-before))
       str)
 
      ;; 当 `pyim-punctuation-half-width-functions' 中
diff --git a/pyim-punctuation.el b/pyim-punctuation.el
index 48ff735a15..fadead2d4c 100644
--- a/pyim-punctuation.el
+++ b/pyim-punctuation.el
@@ -217,6 +217,8 @@ PUNCT-LIST 格式类似:
           (car punc)
         (nth 1 punc)))))
 
+(defun pyim-punctuation-escape-p (char)
+  (member char pyim-punctuation-escape-list))
 
 ;; * Footer
 (provide 'pyim-punctuation)



reply via email to

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