[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim 58ecafa 1/2: * pyim.el (pyim-hack-deactivate-input
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pyim 58ecafa 1/2: * pyim.el (pyim-hack-deactivate-input-method, advice-add): evil hack. #367 #361 #275 |
Date: |
Wed, 28 Apr 2021 03:57:23 -0400 (EDT) |
branch: externals/pyim
commit 58ecafad8ea9b01afba7f0f6c4516965567bbe86
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
* pyim.el (pyim-hack-deactivate-input-method, advice-add): evil hack. #367
#361 #275
---
pyim.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/pyim.el b/pyim.el
index 9aac1da..aa4dca6 100644
--- a/pyim.el
+++ b/pyim.el
@@ -828,6 +828,16 @@ FILE 的格式与 `pyim-dcache-export' 生成的文件格式相同,
;; ** pyim 探针
(require 'pyim-probe)
+;; ** Evil hack
+(defun pyim-hack-deactivate-input-method (orig_func)
+ (let ((deactivate-current-input-method-function
+ (or deactivate-current-input-method-function #'ignore)))
+ (funcall orig_func)))
+
+(with-eval-after-load
+ (advice-add 'deactivate-input-method :around
#'pyim-hack-deactivate-input-method))
+
+
;; * Footer
(provide 'pyim)