Skip to content

Instantly share code, notes, and snippets.

@mrvdb
Last active August 29, 2015 14:01
Show Gist options
  • Save mrvdb/2923c47325314a64a8a4 to your computer and use it in GitHub Desktop.
Save mrvdb/2923c47325314a64a8a4 to your computer and use it in GitHub Desktop.
(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