How to set a specific input method to emacs specific major-mode if I have a condition?

75 Views Asked by At

I need to set Russian input method if I open a line from po-mode and only from po-mode. The line opens in txt-mode in which default is English.

Thanks.

1

There are 1 best solutions below

0
jpkotta On

Probably something like:

(setq default-input-method "russian-computer")
(add-hook 'po-mode-hook #'toggle-input-method)

You can manually toggle the input method with M-x toggle-input-method or C-\.

Get a list of available input methods with M-x list-input-methods.