branch: externals/pyim commit 58ecafad8ea9b01afba7f0f6c4516965567bbe86 Author: Feng Shu <tuma...@163.com> Commit: Feng Shu <tuma...@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)