# HG changeset patch # User Oleksandr Gavenko # Date 1381585119 -10800 # Node ID 37ddc669849c5559c37670924fc16efe835697df # Parent 8fad37c1d42f2e60e198da738a390f2c62ace77e Enhance selection of input methods by using numeric prefix for modeless switching. diff -r 8fad37c1d42f -r 37ddc669849c .emacs-my --- a/.emacs-my Sat Oct 12 15:43:06 2013 +0300 +++ b/.emacs-my Sat Oct 12 16:38:39 2013 +0300 @@ -683,12 +683,29 @@ ;; cyrillic-jcuken for SHIFT 567 is :,. ;; russian-computer for SHIFT 567 is %^& (setq my-russian-input-method 'russian-computer) -(setq my-ukranian-input-method 'ukranian-computer) +(setq my-ukranian-input-method 'ukrainian-computer) +(setq my-ipa-input-method 'ipa-x-sampa) (when (<= emacs-major-version 21) (setq my-russian-input-method 'cyrillic-jcuken) (setq my-ukranian-input-method 'cyrillic-jcuken)) (setq default-input-method my-russian-input-method) +(defun my-toggle-input-method (&optional arg) + (interactive "P") + (if (numberp arg) + (cond + ((eq arg 1) + (activate-input-method nil)) + ((eq arg 2) + (activate-input-method my-russian-input-method)) + ((eq arg 3) + (activate-input-method my-ukranian-input-method)) + ((eq arg 4) + (activate-input-method my-ipa-input-method)) ) + (toggle-input-method arg)) ) + +(global-set-key (kbd "C-\\") 'my-toggle-input-method) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (message "mouse")