Last active
August 29, 2015 14:01
-
-
Save mrvdb/2923c47325314a64a8a4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(register-input-method | |
"MyTeX" "UTF-8" 'quail-use-package | |
"\\" "Personalized TeX input method" | |
"~/.emacs.d/mytex-inputmethod") | |
(defun mrb/set-input-method() | |
(interactive) | |
(setq default-input-method "MyTeX") | |
;; Toggle only if it not active yet | |
(if (not current-input-method) | |
(toggle-input-method))) | |
(add-hook 'set-language-environment-hook 'mrb/set-input-method) | |
;; And now we can set it | |
(set-language-environment "UTF-8") | |
(add-hook 'text-mode-hook 'mrb/set-input-method) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment