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

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

[elpa] externals/pyim 5be6de9076 03/22: Add pyim-process-force-input-chi


From: ELPA Syncer
Subject: [elpa] externals/pyim 5be6de9076 03/22: Add pyim-process-force-input-chinese function
Date: Fri, 24 Jun 2022 16:57:51 -0400 (EDT)

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

    Add pyim-process-force-input-chinese function
---
 pyim-process.el | 3 +++
 pyim.el         | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/pyim-process.el b/pyim-process.el
index e4220abae3..3343728298 100644
--- a/pyim-process.el
+++ b/pyim-process.el
@@ -269,6 +269,9 @@ imobj 组合构成在一起,构成了 imobjs 这个概念。比如:
               (cl-decf pos)))))
       end-position)))
 
+(defun pyim-process-force-input-chinese ()
+  (setq pyim-process-force-input-chinese t))
+
 (defun pyim-process-auto-switch-english-input-p ()
   "判断是否 *根据环境自动切换* 为英文输入模式,这个函数处理变量:
 `pyim-english-input-switch-functions'"
diff --git a/pyim.el b/pyim.el
index 3004720090..c60198270c 100644
--- a/pyim.el
+++ b/pyim.el
@@ -825,7 +825,7 @@ FILE 的格式与 `pyim-dcache-export' 生成的文件格式相同,
       (run-hooks 'pyim-convert-string-at-point-hook)
       (when (> length 0)
         (pyim-add-unread-command-events code)
-        (setq pyim-process-force-input-chinese t)))
+        (pyim-process-force-input-chinese)))
      ;; 当光标前的一个字符是标点符号时,半角/全角切换。
      ((pyim-string-match-p "[[:punct:]:-]" (pyim-char-before-to-string 0))
       (call-interactively 'pyim-punctuation-translate-at-point))



reply via email to

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