-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit-eim.el
24 lines (23 loc) · 1.08 KB
/
init-eim.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
;; EIM Input Method. Use C-\ to toggle input method.
(autoload 'eim-use-package "eim" "Another emacs input method")
(setq eim-use-tooltip nil) ; don't use tooltip
(setq eim-punc-translate-p nil) ; use English punctuation
(register-input-method
"eim-py" "euc-cn" 'eim-use-package
"pinyin" "EIM Chinese Pinyin Input Method" "py.txt"
'my-eim-py-activate-function)
(set-input-method "eim-py") ; use Pinyin input method
(setq activate-input-method t) ; active input method
(toggle-input-method nil) ; default is turn off
(defun my-eim-py-activate-function ()
(add-hook 'eim-active-hook
(lambda ()
(let ((map (eim-mode-map)))
(define-key eim-mode-map "-" 'eim-previous-page)
(define-key eim-mode-map "=" 'eim-next-page)))))
;; prevent the command line to stay at the bottom of the window
;; (add-hook 'shell-mode-hook
;; (lambda()
;; (remove-hook 'comint-output-filter-functions
;; 'comint-postoutput-scroll-to-bottom t)))
(provide 'init-eim)