[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim 4ff29d474a 19/22: Add functions about assistant
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pyim 4ff29d474a 19/22: Add functions about assistant |
Date: |
Fri, 24 Jun 2022 16:57:53 -0400 (EDT) |
branch: externals/pyim
commit 4ff29d474af27eaefad28311018a415dbd7797fe
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
Add functions about assistant
---
pyim-page.el | 2 +-
pyim-scheme.el | 13 +++++++++++++
pyim.el | 5 ++---
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/pyim-page.el b/pyim-page.el
index e16f2ddc64..fd57221334 100644
--- a/pyim-page.el
+++ b/pyim-page.el
@@ -187,7 +187,7 @@ page 的概念,比如,上面的 “nihao” 的 *待选词列表* 就可以
:candidates candidate-showed
:position positon
:hightlight-current hightlight-current
- :assistant-enable pyim-assistant-scheme-enable)))
+ :assistant-enable (pyim-scheme-assistant-status))))
;; Show page.
(when (and (null unread-command-events)
(null unread-post-input-method-events))
diff --git a/pyim-scheme.el b/pyim-scheme.el
index dc8df74add..817b7bbeef 100644
--- a/pyim-scheme.el
+++ b/pyim-scheme.el
@@ -159,6 +159,19 @@
(equal (pyim-scheme-name x) scheme-name))
pyim-schemes)))
+(defun pyim-scheme-assistant-status ()
+ pyim-assistant-scheme-enable)
+
+(defun pyim-scheme-enable-assistant ()
+ (setq pyim-assistant-scheme-enable t))
+
+(defun pyim-scheme-disable-assistant ()
+ (setq pyim-assistant-scheme-enable nil))
+
+(defun pyim-scheme-toggle-assistant ()
+ (setq pyim-assistant-scheme-enable
+ (not pyim-assistant-scheme-enable)))
+
;; 注意:这个 quanpin scheme 在 pyim 中有特殊的作用,许多功能都依赖 quanpin
;; scheme 的存在,所以这个 scheme 不可以删除,也不可以更改名字。
(pyim-scheme-add
diff --git a/pyim.el b/pyim.el
index f70382d639..b3789c8555 100644
--- a/pyim.el
+++ b/pyim.el
@@ -261,7 +261,7 @@ pyim 使用函数 `pyim-activate' 启动输入法的时候,会将变量
(pyim-process-init-dcaches)
;; 启动或者重启的时候,退出辅助输入法。
- (setq pyim-assistant-scheme-enable nil)
+ (pyim-scheme-disable-assistant)
(run-hooks 'pyim-load-hook)
;; Make sure personal or other dcache are saved to file before kill emacs.
@@ -678,8 +678,7 @@ FILE 的格式与 `pyim-dcache-export' 生成的文件格式相同,
(progn
(pyim-process-outcome-handle 'last-char)
(pyim-process-terminate))
- (setq pyim-assistant-scheme-enable
- (not pyim-assistant-scheme-enable))
+ (pyim-scheme-toggle-assistant)
(pyim-process-run)))
;; ** PYIM 输入操作命令
- [elpa] externals/pyim updated (0a9137cbf2 -> c94f38ffda), ELPA Syncer, 2022/06/24
- [elpa] externals/pyim b78408a32d 08/22: pyim-process-translating -> pyim-process--translating, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 904158eeea 05/22: Add functions about last created words., ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 2bdbf13588 01/22: Add pyim-process-toggle-input-ascii., ELPA Syncer, 2022/06/24
- [elpa] externals/pyim c6d66eb229 04/22: pyim-process-force-input-chinese* -> pyim-process--force-input-chinese*, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 5be6de9076 03/22: Add pyim-process-force-input-chinese function, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 263c914d98 11/22: Sort pyim-process.el, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 4ff29d474a 19/22: Add functions about assistant,
ELPA Syncer <=
- [elpa] externals/pyim 0cbf92253d 16/22: pyim-indicator-stop-daemon -> pyim-indicator--stop-daemon, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 6143931277 18/22: Sort pyim-punctuation.el, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim aa500a5174 20/22: pyim-scheme-enable-assistant-p -> pyim-scheme--enable-assistant-p, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim b744349efb 02/22: pyim-process-input-ascii -> pyim-process--input-ascii, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 9fbdc6c19e 13/22: pyim-process-self-insert-commands -> pyim-process--self-insert-commands, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim c94f38ffda 22/22: Add pyim-scheme-get-all-schemes, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim a457fb8960 06/22: pyim-process-last-created-words -> pyim-process--last-created-words, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 97c95520f7 07/22: Add functions about pyim-process-translating, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim d369b1a191 09/22: Sort pyim-process.el, ELPA Syncer, 2022/06/24
- [elpa] externals/pyim 46b94dfbea 17/22: Add pyim-punctuation-escape-p, ELPA Syncer, 2022/06/24