西山和広です。
>>>>> On Sat, 9 Dec 2006 03:08:01 +0900
>>>>> maruyama.yuzo@xxxxxxxxx("Yuzo Maruyama") said:
> ネット上には,(私の調べ方が悪いのかもしれませんが)
> 中々情報がありません.一点分かったことは,yatex.elでは
> jmodeと jmode-offで日本語と英数の切替えを制御している
> ようなのですが,以下に添付したように
> 具体的な入力方法に応じて別個に書く必要がありそうだと
> いうことです.
> しかしながら,自分には十分な知識,能力がありませんので
> yatex.elでcannaをanthy に置換するくらいしか
> 出来ません.残念ながらそれをbyte compileしたくらいでは
> うまく行きませんでした.
>
> どなたか分かる方はいらっしゃいませんか?
> あるいは別の方法でうまく$入力時の動作を制御する方法は
> ありますでしょうか?
> 教えていただければ幸いです.
>
> ---------------------yatex.elより--------------------------------------
> (defun YaTeX-jmode ()
> (or (and (boundp 'canna:*japanese-mode*) canna:*japanese-mode*)
> (and (boundp 'egg:*mode-on*) egg:*mode-on* egg:*input-mode*)))
>
> (defun YaTeX-jmode-off ()
> (cond
> ((and (boundp 'canna:*japanese-mode*) canna:*japanese-mode*)
> (canna-toggle-japanese-mode))
> ((and (boundp 'egg:*mode-on*) egg:*mode-on* egg:*input-mode*)
> (egg:toggle-egg-mode-on-off))
> ((and (fboundp 'skk-mode) (boundp 'skk-mode) skk-mode)
> (cond
> ((fboundp 'skk-latin-mode) (skk-latin-mode t))
> ((fboundp 'skk-mode-off) (skk-mode-off))
> (t (j-mode-off))))
> ((and (fboundp 'toggle-input-method) current-input-method)
> (toggle-input-method))
> ((and (fboundp 'fep-force-off) (fep-force-off)))))
> ----------------------------------------------------------------
anthy.elを使っているのなら、current-input-methodが変わるようなので、
YaTeX-jmode-offと同じようにYaTeX-jmodeの方でもcurrent-input-methodに
対応すれば良さそうです。
というわけで、
(defun YaTeX-jmode ()
(or (and (boundp 'canna:*japanese-mode*) canna:*japanese-mode*)
(and (boundp 'egg:*mode-on*) egg:*mode-on* egg:*input-mode*)
(and (boundp 'skk-mode) skk-mode)
(and (boundp 'current-input-method) current-input-method)))
でどうでしょうか?
--
|ZnZ(ゼット エヌ ゼット)
|西山和広(Kazuhiro NISHIYAMA)