[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim eb585d56d1 10/26: Simplify pyim-select-word-by-num
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pyim eb585d56d1 10/26: Simplify pyim-select-word-by-number |
Date: |
Sun, 26 Jun 2022 10:57:52 -0400 (EDT) |
branch: externals/pyim
commit eb585d56d16a4f4b59eb9ddd1006b3227fcbd54e
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
Simplify pyim-select-word-by-number
---
pyim-process.el | 1 +
pyim.el | 9 ++++-----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/pyim-process.el b/pyim-process.el
index d3cc3f477a..d2c08a02fa 100644
--- a/pyim-process.el
+++ b/pyim-process.el
@@ -644,6 +644,7 @@ imobj 组合构成在一起,构成了 imobjs 这个概念。比如:
(cl-defmethod pyim-process-select-word ((_scheme pyim-scheme-quanpin))
"从选词框中选择当前词条,然后删除该词条对应拼音。"
+ (pyim-process-create-code-criteria)
(pyim-process-outcome-handle 'candidate)
(let* ((imobj (pyim-process-get-first-imobj))
(length-selected-word
diff --git a/pyim.el b/pyim.el
index ab4fcb4139..26ac5967df 100644
--- a/pyim.el
+++ b/pyim.el
@@ -468,7 +468,6 @@ FILE 的格式与 `pyim-dcache-export' 生成的文件格式相同,
(defun pyim-select-word ()
"从选词框中选择当前词条,然后删除该词条对应拼音。"
(interactive)
- (pyim-process-create-code-criteria)
(if (pyim-process-get-candidates)
(pyim-process-select-word (pyim-scheme-current))
;; 如果没有选项,输入空格
@@ -478,10 +477,10 @@ FILE 的格式与 `pyim-dcache-export' 生成的文件格式相同,
"使用数字编号来选择对应的词条。"
(interactive)
(if (or pyim-select-word-by-number num)
- (if (null (pyim-process-get-candidates))
- (pyim-process-select-last-char)
- (when (pyim-page-plan-to-select-word num)
- (pyim-select-word)))
+ (if (and (pyim-process-get-candidates)
+ (pyim-page-plan-to-select-word num))
+ (pyim-process-select-word (pyim-scheme-current))
+ (pyim-process-select-last-char))
;; 有些输入法使用数字键编码,这种情况下,数字键就
;; 不能用来选词了。
(call-interactively #'pyim-self-insert-command)))
- [elpa] externals/pyim updated (c94f38ffda -> 4b459fb22c), ELPA Syncer, 2022/06/26
- [elpa] externals/pyim 4434994a5a 12/26: Move pyim-process-get-first-imobj, ELPA Syncer, 2022/06/26
- [elpa] externals/pyim 5b01929736 07/26: pyim--input-method -> pyim-process-input-method, ELPA Syncer, 2022/06/26
- [elpa] externals/pyim fbbeb02817 01/26: pyim-process-set-candidate-position -> pyim-process-plan-to-select-word, ELPA Syncer, 2022/06/26
- [elpa] externals/pyim 67e16e96a5 02/26: Move pyim-process-plan-to-select-word, ELPA Syncer, 2022/06/26
- [elpa] externals/pyim 424169d8d8 06/26: Add pyim-process-select-word-and-last-char, ELPA Syncer, 2022/06/26
- [elpa] externals/pyim 95e4dd4b27 04/26: pyim-select-word-really -> pyim-process-select-word, ELPA Syncer, 2022/06/26
- [elpa] externals/pyim 63d7b16f46 05/26: Add pyim-process-select-last-char, ELPA Syncer, 2022/06/26
- [elpa] externals/pyim b769c97469 13/26: Add pyim-select-word-by-number-1, ELPA Syncer, 2022/06/26
- [elpa] externals/pyim eb585d56d1 10/26: Simplify pyim-select-word-by-number,
ELPA Syncer <=
- [elpa] externals/pyim 74fdade342 16/26: Add ignore-errors in pyim-process-with-entered-buffer., ELPA Syncer, 2022/06/26
- [elpa] externals/pyim 7e80507f17 25/26: pyim-process-next-word-position, ELPA Syncer, 2022/06/26
- [elpa] externals/pyim 009c56fd15 21/26: Update comment., ELPA Syncer, 2022/06/26
- [elpa] externals/pyim 1ec45c77bb 08/26: Simplify pyim-select-word-simple, ELPA Syncer, 2022/06/26
- [elpa] externals/pyim e7c8d3782a 14/26: Use pyim-process-select-last-char in pyim-page.el, ELPA Syncer, 2022/06/26
- [elpa] externals/pyim 862776bf21 24/26: Add pyim-process-plan-to-select-next-word, ELPA Syncer, 2022/06/26
- [elpa] externals/pyim 2f9cfb058a 17/26: Add pyim-process-select-nothing, ELPA Syncer, 2022/06/26
- [elpa] externals/pyim d7952b08ef 03/26: Add pyim-page-plan-to-select-word, ELPA Syncer, 2022/06/26
- [elpa] externals/pyim 95a4d01768 09/26: Simplify pyim-select-word, ELPA Syncer, 2022/06/26
- [elpa] externals/pyim 011b87a78f 15/26: Add pyim-process-without-entered-p, ELPA Syncer, 2022/06/26