Enhance selection of input methods by using numeric prefix for modeless
switching.
--- 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")