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

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

[elpa] externals/pyim a9ff530000 1/7: Move pyim-process--punctuation-ful


From: ELPA Syncer
Subject: [elpa] externals/pyim a9ff530000 1/7: Move pyim-process--punctuation-full-width-p
Date: Sun, 26 Jun 2022 20:57:48 -0400 (EDT)

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

    Move pyim-process--punctuation-full-width-p
---
 pyim-process.el | 42 ++++++++++++++++++++----------------------
 1 file changed, 20 insertions(+), 22 deletions(-)

diff --git a/pyim-process.el b/pyim-process.el
index 4d5c85dee3..bf27f3cfb1 100644
--- a/pyim-process.el
+++ b/pyim-process.el
@@ -662,6 +662,17 @@ imobj 组合构成在一起,构成了 imobjs 这个概念。比如:
   (length pyim-process--candidates))
 
 ;; ** 选词造词相关
+(defun pyim-process-select-nothing (&optional do-not-terminate)
+  "不选择任何东西。"
+  (setq pyim-outcome-history nil)
+  (unless do-not-terminate
+    (pyim-process-terminate)))
+
+(defun pyim-process-select-entered (&optional do-not-terminate)
+  (push (pyim-entered-get 'point-before) pyim-outcome-history)
+  (unless do-not-terminate
+    (pyim-process-terminate)))
+
 (cl-defgeneric pyim-process-select-word (scheme)
   "按照 SCHEME 对应的规则,对预选词条进行选词操作。")
 
@@ -948,28 +959,6 @@ alist 列表。"
      ;; 当输入的字符不是标点符号时,原样插入。
      (t str))))
 
-(defun pyim-process-select-word-and-last-char (&optional do-not-terminate)
-  "选择预选词条和上一次输入的字符。"
-  (let ((word (nth (1- pyim-process--word-position)
-                   pyim-process--candidates)))
-    (push (concat (pyim-outcome-get) word
-                  (pyim-process-select-handle-char last-command-event))
-          pyim-outcome-history)
-    (unless do-not-terminate
-      (pyim-process-terminate))))
-
-(defun pyim-process-select-nothing (&optional do-not-terminate)
-  "不选择任何东西。"
-  (setq pyim-outcome-history nil)
-  (unless do-not-terminate
-    (pyim-process-terminate)))
-
-(defun pyim-process-select-entered (&optional do-not-terminate)
-  (push (pyim-entered-get 'point-before) pyim-outcome-history)
-  (unless do-not-terminate
-    (pyim-process-terminate)))
-
-;; ** 符号相关
 (defun pyim-process--punctuation-full-width-p ()
   "判断是否需要切换到全角标点输入模式
 
@@ -992,6 +981,15 @@ alist 列表。"
      (and (not pyim-process--input-ascii)
           (not (pyim-process-auto-switch-english-input-p))))))
 
+(defun pyim-process-select-word-and-last-char (&optional do-not-terminate)
+  "选择预选词条和上一次输入的字符。"
+  (let ((word (nth (1- pyim-process--word-position)
+                   pyim-process--candidates)))
+    (push (concat (pyim-outcome-get) word
+                  (pyim-process-select-handle-char last-command-event))
+          pyim-outcome-history)
+    (unless do-not-terminate
+      (pyim-process-terminate))))
 
 ;; * Footer
 (provide 'pyim-process)



reply via email to

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