From 7da4e7a4597ee1129c5bc7df40b4e4e586ff5edd Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sun, 13 Mar 2022 10:52:33 +0800 Subject: Update the config of im (emacs) --- .emacs.d/lisp/init-input-method.el | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.emacs.d/lisp/init-input-method.el b/.emacs.d/lisp/init-input-method.el index d9390b2..5c0c61b 100644 --- a/.emacs.d/lisp/init-input-method.el +++ b/.emacs.d/lisp/init-input-method.el @@ -6,17 +6,14 @@ (when *is-a-mac* (setq sis-external-ism "/usr/local/bin/macism") (setq sis-english-source "com.apple.keylayout.ABC" - sis-other-source "com.apple.inputmethod.SCIM.ITABC") - (setq sis-do-set - (lambda (source) (start-process "set-input-source" nil - sis-external-ism source))) - (setq sis-do-get - (lambda () (start-process "get-input-source" nil - sis-external-ism))) + sis-other-source "com.apple.inputmethod.SCIM.ITABC") (when (gx/maybe-require-package 'sis) (add-hook 'after-init-hook (lambda () (sis-global-respect-mode t) - (sis-global-context-mode t))))) + (sis-global-context-mode t)))) + + (with-eval-after-load 'sis + (add-hook 'evil-insert-state-exit-hook 'sis-set-english))) (provide 'init-input-method) -- cgit v1.2.3