1 ;;; mule-cne.el --- interface between input methods Canna and EGG.
3 ;; This file is part of XEmacs.
5 ;; XEmacs is free software; you can redistribute it and/or modify it
6 ;; under the terms of the GNU General Public License as published by
7 ;; the Free Software Foundation; either version 2, or (at your option)
10 ;; XEmacs is distributed in the hope that it will be useful, but
11 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ;; General Public License for more details.
15 ;; You should have received a copy of the GNU General Public License
16 ;; along with XEmacs; see the file COPYING. If not, write to the
17 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 ;; Boston, MA 02111-1307, USA.
19 ;; Canna and Egg on Nemacs/Mule is distributed in the forms of
20 ;; patches to Nemacs under the terms of the GNU EMACS GENERAL
21 ;; PUBLIC LICENSE which is distributed along with GNU Emacs by
22 ;; the Free Software Foundation.
24 ;; Written by Akira Kon, NEC Corporation.
25 ;; E-Mail: kon@d1.bs2.mt.nec.co.jp.
27 ;; -*-mode: emacs-lisp-*-
29 ;; !Id: can-n-egg.el,v 1.7 1994/03/16 07:24:15 kon Exp !
31 ;;
\e$B$3$N5!G=$r;H$&$K$O!"
\e(B
32 ;; M-x load
\e$B$3$N%U%!%$%k
\e(B
34 ;;
\e$B$r<B9T$7$^$9!#
\e(B
44 ;;;
\e$B$3$N4X?t$G$O!"8=:_$N%b!<%I$,!X$+$s$J!Y$NF|K\8lF~NO%b!<%I$+
\e(B
45 ;;;
\e$B$I$&$+$r%A%'%C%/$7$F!"!X$+$s$J!Y$NF|K\8lF~NO%b!<%I$G$J$$$N
\e(B
46 ;;;
\e$B$G$"$l$P!"!X$?$^$4!Y$N
\e(B egg-self-insert-command
\e$B$r8F$V!#!X$+
\e(B
47 ;;;
\e$B$s$J!Y$NF|K\8lF~NO%b!<%I$G$"$l$P!"!X$+$s$J!Y$N
\e(B
48 ;;; canna-self-insert-command
\e$B$r8F$V!#
\e(B
50 (defvar canna-exec-hook nil)
51 (defvar canna-toggle-key nil)
52 (defvar egg-toggle-key nil)
54 (defun can-n-egg-self-insert-command (arg)
55 "Self insert pressed key and use it to assemble Romaji character."
57 (if canna:*japanese-mode*
58 (canna-self-insert-command arg)
59 (egg-self-insert-command arg)))
61 ;;
\e$B$+$s$J$@$C$?$i:FJQ49!"$?$^$4$@$C$?$iIaDL$N%-!<F~NO!#
\e(B
62 ;; by rtakigaw@jp.oracle.com, 1994.3.16
63 (defun can-n-egg-henkan-region-or-self-insert (arg)
64 "Do Canna Kana-to-Kanji re-conversion in region or Egg self insert."
66 (if canna:*japanese-mode*
67 (canna-henkan-region-or-self-insert arg)
68 (egg-self-insert-command arg)))
71 "Start to use both Canna and Egg."
74 (run-hooks canna-exec-hook)
78 (define-key global-map (make-string 1 ch) 'can-n-egg-self-insert-command)
80 (if canna-use-space-key-as-henkan-region
82 (global-set-key "\C-@" 'canna-set-mark-command)
83 (global-set-key " " 'can-n-egg-henkan-region-or-self-insert)))
85 (if canna-toggle-key canna-toggle-key "\C-o") 'canna-toggle-japanese-mode)
87 (if egg-toggle-key egg-toggle-key "\C-\\") 'toggle-egg-mode) )