TeX-math-input-method-off

Masayuki Ataka <[email protected]> Tue, 08 Mar 2005 06:46:39 +0900 (JST)
Newsgroups gmane.emacs.auc-tex
Message-ID <[email protected]>
AUCTeX toggle off CJK input method automatically, when user
come into math mode with M-x LaTeX-environment, because CJK
chars are mostly not used in math mode.  Ikumi Keita reported
me that auto-toggle-off-input-method does not work when
inserting align* and similar environment.  Thet because they
are only defined as (LaTeX-add-environments "align*" ...)  in
amsmath.el.

If no objection, I'll add the following code to
LaTeX-insert-environment, which checks if we are in math mode
and if input method is active, and toggle off input method.

*** latex.el	08  3 2005 05:04:33 +0900	5.338
--- latex.el	08  3 2005 06:14:32 +0900	
***************
*** 612,618 ****
      (if active-mark
  	(or (assoc environment LaTeX-indent-environment-list)
  	    (LaTeX-fill-environment nil))
-       (indent-according-to-mode))))
+       (indent-according-to-mode)))
+   (TeX-math-input-method-off))
  
  (defun LaTeX-modify-environment (environment)
    "Modify current ENVIRONMENT."
***************

Currently, TeX-toggle-off-input-method is working only with CJK
input methods provided by LEIM.  If you want
auto-toggle-off-input-method for your own, please, tell me.

bye,
---
email: [email protected]
Name:: Masayuki Ataka // (Japan)