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

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

[elpa] externals/pyim 2f9cfb058a 17/26: Add pyim-process-select-nothing


From: ELPA Syncer
Subject: [elpa] externals/pyim 2f9cfb058a 17/26: Add pyim-process-select-nothing
Date: Sun, 26 Jun 2022 10:57:52 -0400 (EDT)

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

    Add pyim-process-select-nothing
---
 pyim-process.el | 4 ++++
 pyim.el         | 7 +++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/pyim-process.el b/pyim-process.el
index b169119349..a63cabcdd8 100644
--- a/pyim-process.el
+++ b/pyim-process.el
@@ -734,6 +734,10 @@ imobj 组合构成在一起,构成了 imobjs 这个概念。比如:
   (pyim-process-outcome-handle 'candidate-and-last-char)
   (pyim-process-terminate))
 
+(defun pyim-process-select-nothing ()
+  (pyim-process-outcome-handle "")
+  (pyim-process-terminate))
+
 ;; ** 上屏相关
 (defun pyim-process-toggle-set-subword-info (n)
   (if (member n pyim-outcome-subword-info)
diff --git a/pyim.el b/pyim.el
index 59c7c2a8c1..1caec756df 100644
--- a/pyim.el
+++ b/pyim.el
@@ -578,10 +578,9 @@ FILE 的格式与 `pyim-dcache-export' 生成的文件格式相同,
   (interactive)
   (pyim-process-with-entered-buffer
     (delete-char (- 0 (or n 1))))
-  (if (> (length (pyim-process-get-entered 'point-before)) 0)
-      (pyim-process-run)
-    (pyim-process-outcome-handle "")
-    (pyim-process-terminate)))
+  (if (pyim-process-without-entered-p)
+      (pyim-process-select-nothing)
+    (pyim-process-run)))
 
 (defun pyim-delete-forward-char ()
   "向前删除1个字符"



reply via email to

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