[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim e1aeac91ee 6/6: Add pyim-punctuation-auto-half-wid
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pyim e1aeac91ee 6/6: Add pyim-punctuation-auto-half-width-p |
Date: |
Mon, 27 Jun 2022 05:57:58 -0400 (EDT) |
branch: externals/pyim
commit e1aeac91ee18726603f31a8158a239aad6899526
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
Add pyim-punctuation-auto-half-width-p
---
pyim-process.el | 10 ++--------
pyim-punctuation.el | 9 +++++++++
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/pyim-process.el b/pyim-process.el
index 1663875645..f4a24a4cf3 100644
--- a/pyim-process.el
+++ b/pyim-process.el
@@ -920,14 +920,8 @@ alist 列表。"
((pyim-punctuation-escape-p (char-before))
str)
- ;; 当 `pyim-punctuation-half-width-functions' 中
- ;; 任意一个函数返回值为 t 时,插入英文标点。
- ((cl-some (lambda (x)
- (if (functionp x)
- (funcall x char)
- nil))
- pyim-punctuation-half-width-functions)
- str)
+ ;; 自动切换全角/半角标点符号。
+ ((pyim-punctuation-auto-half-width-p char) str)
;; 当光标前面为英文标点时, 按 `pyim-outcome-trigger'
;; 对应的字符后, 自动将其转换为对应的中文标点。
diff --git a/pyim-punctuation.el b/pyim-punctuation.el
index 3ace4e0bc0..6e4a806317 100644
--- a/pyim-punctuation.el
+++ b/pyim-punctuation.el
@@ -220,6 +220,15 @@ PUNCT-LIST 格式类似:
(defun pyim-punctuation-escape-p (char)
(member char pyim-punctuation-escape-list))
+(defun pyim-punctuation-auto-half-width-p (char)
+ "测试是否自动切换到半角标点符号。"
+ (cl-some (lambda (x)
+ (if (functionp x)
+ (funcall x char)
+ nil))
+ pyim-punctuation-half-width-functions))
+
+
;; * Footer
(provide 'pyim-punctuation)
- [elpa] externals/pyim updated (db676274fa -> e1aeac91ee), ELPA Syncer, 2022/06/27
- [elpa] externals/pyim 31f693a919 3/6: Indent pyim-process-run, ELPA Syncer, 2022/06/27
- [elpa] externals/pyim 3d3044361e 1/6: Remove pyim-process-update-last-candidates, ELPA Syncer, 2022/06/27
- [elpa] externals/pyim 5b21586845 2/6: Move pyim-process-get-entered, ELPA Syncer, 2022/06/27
- [elpa] externals/pyim 885a8a5627 4/6: Move pyim-process-get/last-candidates, ELPA Syncer, 2022/06/27
- [elpa] externals/pyim ae9687fff8 5/6: Sort pyim-process.el, ELPA Syncer, 2022/06/27
- [elpa] externals/pyim e1aeac91ee 6/6: Add pyim-punctuation-auto-half-width-p,
ELPA Syncer <=