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

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

[elpa] externals/pyim 0d0eec01b4 3/5: Add pyim-outcome-call-trigger-func


From: ELPA Syncer
Subject: [elpa] externals/pyim 0d0eec01b4 3/5: Add pyim-outcome-call-trigger-function
Date: Tue, 28 Jun 2022 18:57:50 -0400 (EDT)

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

    Add pyim-outcome-call-trigger-function
---
 pyim-outcome.el | 5 +++++
 pyim-process.el | 3 +--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/pyim-outcome.el b/pyim-outcome.el
index 1df4c6c1af..6ec1a169d5 100644
--- a/pyim-outcome.el
+++ b/pyim-outcome.el
@@ -180,6 +180,11 @@ pyim 的 translate-trigger-char 要占用一个键位,为了防止用户
         (car prefer-triggers)
       user-trigger)))
 
+(defun pyim-outcome-call-trigger-function ()
+  (when (functionp pyim-outcome-trigger-function)
+    (funcall pyim-outcome-trigger-function)
+    (message "PYIM: 运行 `pyim-outcome-trigger-function' 函数。")))
+
 (defun pyim-outcome-trigger-function-default (&optional no-space)
   "默认的 `pyim-outcome-trigger-function'.
 
diff --git a/pyim-process.el b/pyim-process.el
index 017ae7477b..b38b3c974c 100644
--- a/pyim-process.el
+++ b/pyim-process.el
@@ -880,8 +880,7 @@ BUG:拼音无法有效地处理多音字。"
       "")
 
      ((pyim-process--trigger-call-function-p char)
-      (funcall pyim-outcome-trigger-function)
-      (message "PYIM: 运行 `pyim-outcome-trigger-function' 函数。")
+      (pyim-outcome-call-trigger-function)
       "")
 
      ((pyim-process--trigger-punctuation-to-full-width-p char)



reply via email to

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