[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] How to implement the function? Identify state of input meth
Re: [AUCTeX] How to implement the function? Identify state of input method.
Wed, 20 Aug 2008 18:15:03 +0300
KMail/1.10.0 (Linux/126.96.36.199-0.1-default; KDE/4.1.1; i686; ; )
On Wednesday 20 August 2008, xiaopeng hu wrote:
> I use Ctrol to switch my input method between chinese and english.
> When I input $, coming in math mode,I need to automatically switch to
> english input method (push "Ctrl" key).
> First, I simulate a keystrike "t"+<space>, I will get a chinese character
> (not equal "t ")if my input method is chinese. Now I need Emacs
> automatically simulate a "Ctrl" key to switch to english input method.
> All of these is just after when I input $.
> How to implement the function?
I have attached a minor mode that changes the input encoding when
entering and exiting math-mode or after a backslash. Copy it to a directory
that is in the emacs load path (such as /usr/share/emacs/site-lisp/) and add:
(autoload 'latex-i18n-mode "latex-i18n" t)
(add-hook 'LaTeX-mode-hook 'latex-i18n-mode)
Hope this helps.
Description: Text Data