$NetBSD: patch-aa,v 1.10 2009/08/17 16:05:32 taca Exp $

Index: AUTHORS
===================================================================
RCS file: /cvs/tamago/tamago/AUTHORS,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -d -u -p -r1.1.1.1 -r1.2
--- AUTHORS	27 Jan 2001 18:45:24 -0000	1.1.1.1
+++ AUTHORS	23 Aug 2002 07:46:38 -0000	1.2
@@ -4,16 +4,17 @@ KAWABATA, Taichi  <kawabata@exa.onlab.nt
 MORIOKA Tomohiko  <tomo@etl.go.jp>
 	Use of custom.
 
-NIIBE Yutaka <gniibe@chroot.org>
+NIIBE Yutaka <gniibe@m17n.org>
 	Design a part of ITS programming.
 	Wrote ITS:
 	    its.el
 	    its/hira.el
-	Wrote tamago.el, menudiag.el, tamago-cnv.el, tamago-comm.el,
-	and tamago-mlh.el.
+	Wrote egg.el, menudiag.el, egg-cnv.el, egg-com.el,
+	and egg-mlh.el.
 	Wrote backend conversion engine interface:
-	    SJ3: tamago-lib/sj3.el, tamago-lib/sj3rpc.el,
-	    WNN: tamago-lib/wnn.el, and tamago-lib/wnnrpc.el.
+	    ANTHY: egg/anthy.el, egg/anthyipc.el, 
+	    SJ3: egg/sj3.el, egg/sj3rpc.el,
+	    WNN: egg/wnn.el, and egg/wnnrpc.el.
 
 KATAYAMA Yoshio <kate@pfu.co.jp>
 	Design ITS programming.
Index: ChangeLog
===================================================================
RCS file: /cvs/tamago/tamago/ChangeLog,v
retrieving revision 1.1.1.5
retrieving revision 1.14
diff -d -u -p -r1.1.1.5 -r1.14
--- ChangeLog	27 Jan 2001 18:46:59 -0000	1.1.1.5
+++ ChangeLog	9 Sep 2002 08:50:42 -0000	1.14
@@ -1,156 +1,60 @@
-2000-01-17  TOMURA Satoru <tomura@etl.go.jp>
-
-	* Version 4.0.6 released
-	
-2000-01-17  TOMURA Satoru <tomura@etl.go.jp>
-
-	* README.ja.text: mentiond about doc/lc99.text
-	
-2000-01-17  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	* its.el (its-hiragana, its-katanaka): modified
-	(its-zenkaku, its-hankaku): added
-	(its-put-cursor): bug fixed.
-	(its-set-cursor-status): redefined.
-	(its-search-beginning, its-search-end): created.
-	(its-end-of-input-buffer): modified.
-	(its-kill-line): modified.
-	(its-cancel-input): modified.
-	(its-japanese-hankaku): added.
-	(its-convert): added.
-	* egg.el (egg-redraw-face): bug fixed.
-	
-2000-01-17  SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
-	
-	* its.el (its-hiragana, its-katakana): re-added.
-	
-2000-01-17  SANETO Takanori <sanewo@ba2.so-net.ne.jp>
-
-	* Makefile.in: move its-keydefs.el from ITSELS to TOPELS
-	
-2000-01-16
-	
-	* egg-sim.el: many functions renamed and modified...
-	* doc/code-table: created
-	
-2000-01-15  TOMURA Satoru <tomura@etl.go.jp>
-	
-	* egg-sim.el: rename egg-code.el as egg-sim.el
-	* egg-sim.el (egg-simple-input-method): rename
-	egg-insert-character as egg-simple-input-method
-	* egg.el: rename egg-insert-character as egg-simple-input-method
-	* doc/lc99.txt: added.
-	
-2000-01-14  TOMURA Satoru <tomura@etl.go.jp>
-	* egg-code.el: created
-	* egg.el: Bind egg-insert-character to C-^ in egg-mode
-	* egg.el: Delete the binding for C-_ in egg-mode
-	* Makefile.in: add egg-code to ${SRCS}
-	
-2000-01-13  TOMURA Satoru <tomura@etl.go.jp>
-	
-	* Version 4.0.5 released.
-
-2000-01-13  Katsumi Yamaoka <yamaoka@jpl.org>
-	
-	* egg/sj3.el (sj3-end-conversion): Restrain from overrunning.
-	
-2000-01-13  Katsumi Yamaoka <yamaoka@jpl.org>
-	* egg/sj3rpc.el (sj3rpc-open): Use `sj3-server-version' instead of
-	2.
-	(sj3rpc-unpack-mb-string): New macro.
-	(sj3rpc-tanbunsetsu-conversion, sj3rpc-get-bunsetsu-candidates-sub,
-	sj3rpc-begin): Use it instead of `comm-unpack'.
-
-	(sj3rpc-server-coding-system): New macro.
-	(sj3rpc-kugiri-stdy, sj3rpc-tanbunsetsu-conversion,
-	sj3rpc-get-bunsetsu-candidates, sj3rpc-get-bunsetsu-candidates-sub,
-	sj3rpc-begin, sj3rpc-unpack-mb-string): Use it.
-
-	(sj3-const): Switch on the value of `sj3-server-version'.
-	(sj3rpc-kugiri-stdy, sj3rpc-tanbunsetsu-conversion,
-	sj3rpc-get-bunsetsu-candidates, sj3rpc-get-bunsetsu-candidates-sub,
-	sj3rpc-begin): Modify for it.
-
-	* egg/sj3.el (sj3-server-coding-system-list): New user option.
-	(sj3-server-version): Ditto.
+2002-09-09  NIIBE Yutaka  <gniibe@m17n.org>
 
-2000-01-13  SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
+	Check JIS x0213 support at compile time.
+	* check-jisx0213.el: New file.
+	* configure.in: Check if JIS X0213 is supported or not.
+	* Makefile.in (TOPSRCS): Remove egg-x0213.el.
+	(DEPS): Don't load jisx0213.el.
+	(ITSSRCS): Removed its/aynu.el.
+	(AYNU): New variable.
 
-	* its.el: typo
-	* egg.el: typo
+	Bug fix.
+	* its/thai.el (its-thai-add-vowel, its-thai-add-tone): Bug fixes.
+	Just call compose-string.
 	
-2000-01-13  KATAYAMA Yoshio <kate@pfu.co.jp>
+2002-08-26  ISHIKAWA Mutsumi <ishikawa@linux.or.jp>, 
+	Takahiro Kambe <taca@sky.yamashina.kyoto.jp>, 
+	Katsumi Yamaoka  <yamaoka@jpl.org>
 
-	* its.el(its-hiragana, its-katakana): does not work. so deleted.
-	
-2000-01-12  NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp>	
+	* Makefile.in (TOPSRCS): Remove	egg-util.el.  Added egg-x0213.el.
+	(ITSSRCS): Added its/greek.el
+	its/greek.elc: Depends on its-keydef.elc.
 
-	* README.ja.txt: typo
-	* Makefile.in: (clean, distclean): modified.
+2002-08-23  NIIBE Yutaka  <gniibe@m17n.org>
 
-2000-01-12  TOMURA Satoru <tomura@etl.go.jp>
-	
-	* Version 4.0.4 released.
-	
-2000-01-12  TOMURA Satoru <tomura@etl.go.jp>
+	* AUTHORS (NIIBE Yutaka): Updated.
+	* egg-mlh.el: Update e-mail address.
 
-	* REAMDE: removed.
-	
-	* README.ja.txt: created.
-	
-2000-01-12  SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
+	* leim-list.el: Removed eval-when contstuct.  Reoved "loading
+	another" feature.
+	(egg-activate-anthy): Added.
 
-	* Makefile.in: "clean" removes ${ELCS}.
-	
-	* Makefile.in: "distclean" created.
-	
-2000-01-12  Satoru Tomura  <tomura@etl.go.jp>
+2002-08-23  Katsumi Yamaoka  <yamaoka@jpl.org>, NIIBE Yutaka  <gniibe@m17n.org>
 
-	* Version 4.0.3 released.
-	
-2000-01-12  Satoru Tomura  <tomura@etl.go.jp>
+	* egg-util.el: Removed.
 
-	* install-sh: copied from automake distribution
+2002-08-08  NIIBE Yutaka  <gniibe@m17n.org>
 
-	* configure.in: created
+	* Makefile.in (EGGSRCS): Added anthy.el and anthyipc.el
+	(srcdir, top_srcdir, VPATH): Added.
+	(DEPS): Use top_srcdir.
 
-	* Makefile.in: created
+	Added ANTHY support.
+	* egg/anthy.el egg/anthyipc.el: New files.
+	* leim-list.el: Added anthy.
 
-	* configure: generated by autoconf
-	
-2000-01-11  Satoru Tomura  <tomura@etl.go.jp>
+2002-08-02  SAITO Takuya <reed@lily.freemail.ne.jp>
 
-	* leim-list.el: (defgroup sj3) added.
+	* its.el (its-previous-line): point-mim -> point-min (typo)
 
-	* egg/sj3.el (sj3-hosname, sj3-server-port): defcusotm'ed
+2002-07-20  SAITO Takuya <reed@lily.freemail.ne.jp>
 
-2000-01-11  Katsumi Yamaoka <yamaoka@jpl.org>
+	* egg.el (egg-activate-keymap-after-command): set-buffer to
+	killed buffer.
 
-	* egg/sj3.el : (require 'egg) added.
+2002-05-08  Katsumi Yamaoka  <yamaoka@jpl.org> (cf. [mule-ja:08306])
 
-2000-01-11  SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
-	
-	* its.el (its-hiragana, its-katakana): New functions
-	
-2000-01-07  Tomura Satoru   <tomura@etl.go.jp>
-	
-	* COPYING: The file is added.
-	
-	* ChangeLog.1: The original ChangeLog is renamed as.
-	
-	* ChangeLog: Created.
-	
-2000-01-07  Tomura Satoru   <tomura@etl.go.jp>
-	
-	* Version 4.0.2 released.
-	
-2000-01-06  Tomura Satoru   <tomura@etl.go.jp>
-	
-	* Version 4.0.1 released.
-	
-2000-01-05  Tomura Satoru   <tomura@etl.go.jp>
-	
-	* Version 4.0.0 released.
-	
+	* its.el (its-next-line, its-previous-line): New commands;
+	substitute key definitions for `next-line' and `previous-line'
+	with them in `its-mode-map'.
 
Index: ChangeLog.0
===================================================================
RCS file: ChangeLog.0
diff -N ChangeLog.0
--- ChangeLog.0	27 Jan 2001 18:46:16 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,2311 +0,0 @@
-1998-07-12  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* egg-mlh.el (mlh-space-bar-backward-henkan): Don't test against
-	egg-conversion-backend-alist.
-
-	* egg/wnn.el (wnn-fini-lang): Reneme from wnn-fini.
-	(wnn-fini): New implementation calling wnn-fini-lang.
-
-	(wnn-close): Call wnn-fini-lang.
-	(wnn-dictionary-save): Ditto.
-
-	* egg/canna.el (canna-fini): Delete LANG argument.
-	* egg/sj3.el (sj3-fini): Ditto.
-
-	* egg-cnv.el (egg-set-conversion-backend): Removed.
-
-	* egg/sj3.el (sj3-start-conversion): Signal error on non-supported
-	language.
-	* egg/canna.el (canna-start-conversion): Likewise.
-	* egg/wnn.el (wnn-start-conversion): Likewise.
-
-	* egg-cnv.el (egg-convert-region): Add handler for
-	lang-not-supported.
-
-	* egg/wnn.el (egg-activate-wnn): load wnnrpc here conditionally.
-	* egg/sj3.el: Likewise.
-	* egg/canna.el: Likewise.
-
-	* egg.el (egg-support-languages, egg-set-support-languages): Removed.
-	(egg-mode): Don't call egg-set-conversion-backend.
-	* egg/{canna.el, wnn.el, sj3.el}: Don't call egg-support-languages.
-
-	* egg-cnv.el (egg-set-current-backend): Removed.
-	(egg-initialize-backend, egg-start-conversion,
-	egg-start-reverse-conversion): Don't call egg-set-current-backend.
-	(egg-conversion-backend-null): Rename from *-other-languages.
-	(egg-conversion-backend-alist): Removed.
-	(egg-conversion-backend): Not buffer local.
-	(egg-finalize-backend-alist): Removed.
-
-1998-07-10  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* egg-cnv.el (egg-start-conversion-failure-hook): New Variable.
-	(egg-start-conversion-failure-fallback): New Function.
-	(egg-convert-region): Handle error and hook on failure.
-
-	* egg/sj3.el (sj3-open): Remove bogus setq-s of sj3-sys-dict-list,
-	sj3-user-dict-list.
-
-	* egg-mlh.el (mlh-space-bar-backward-henkan): Don't emit message
-	"converting...", as it may flush out error message.
-
-	* egg/sj3rpc.el ("egg-com", "egg/sj3"): Require on compilation.
-	(sj3rpc-open): Failure when version is different.
-
-1998-07-03  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	* its/erpin.el, its/hangul.el, its/hankata.el, its/hira.el,
-	its/jeonkak.el, its/kata.el, its/pinyin.el, its/quanjiao.el,
-	its/thai.el, its/zenkaku.el: Updated using new its-*.
-
-	* its.el (define-its-state-machine): Rewritten.
-	(define-its-compiled-map): Deleted.
-	(define-its-state-machine-append): Rewritten.
-	(its-defrule): Rewritten.
-	(its-defrule*): Rewritten.
-	(its-parent-states): New Variable.
-	(its-goto-state): Remove 2nd optional argument INITIAL-STATE.
-	(its-set-interim-terminal-state): New Function.
-	(its-make-next-state): Remove 2nd argument KEYSEQ.
-
-1998-07-01  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* egg-mlh.el (mlh-hira-to-kata): Removed.  Doesn't work any more.
-	(mlh-katakana): Use japanese-katakana-region.
-
-	* egg-cnv.el (egg-conversion-map): Add again mapping for "/".
-
-1998-06-27  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	* egg-cnv.el (egg-abort-conversion): Bug fix.
-
-1998-06-27  NIIBE Yutaka  <gniibe@akebono>
-
-	* egg/wnn.el (wnn-dictionary-specification-list): Don' specify
-	for gerodic/g-jinmei.
-	Suggested by SAKAI Kiyotaka <ksakai@netwk.ntt-at.co.jp>.
-
-1998-06-26  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	* its.el (its-cancel-input): Bug fix.
-
-1998-06-26  SAKAI Kiyotaka <ksakai@netwk.ntt-at.co.jp>
-
-	* egg-cnv.el (egg-conversion-mode, egg-help-command): New
-	functions for help string.
-	* its.el (its-mode, its-mode-help-command): Likewise.
-
-1998-06-26  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	* egg-cnv.el (egg-convert-region): Bug fix.
-	* egg.el (egg-default-language): Don't use string.
-
-	* its/hankata.el (its-han-kata-enable-double-n, and others):
-	Variable name change (-han-) to distingush kata.el.
-
-	* its/erpin.el (its-erpin-tw-enable-quanjioao-alphabet,
-	its-erpin-cn-enable-quanjioao-alphabet): 
-	See its-enable-fullwidth-alphabet.
-	* its/kata.el (its-kata-enable-zenkaku-alphabet): Likewise.
-	* its/pinyin.el (its-pinyin-cn-enable-quanjioao-alphabet): Likewise.
-	* its/zenkaku.el (its-zenkaku-down-map): Likewise.
-
-	* its/erpin.el (its-erpin-tw-map): Bug fix for "\\", "{", "}", and
-	"/".
-	* its/pinyin.el (its-pinyin-cn-map): Ditto.
-	* its/quanjiao.el (its-quanjiao-down-tw-map): Ditto.
-	* its/zhuyin.el (its-zhuyin-cn-enable-quanjioao-alphabet): Ditto.
-
-	* its/hira.el (its-hira-enable-zenkaku-alphabet): Follow changes
-	of its.el.
-	* its/ascii.el (its-up-map, its-down-map): Ditto.
-	* its/jeonkak.el (its-jeonkak-up-map): Ditto.
-
-	* its/hira.el (its-hira-enable-zenkaku-alphabet): 
-	See its-enable-fullwidth-alphabet.
-
-	* egg/wnn.el (wnn-save-dictionaries): Rewritten.
-
-	* egg/canna.el (egg-edep): Required.
-	(canna-support-languages): Use symbol.
-	* egg/sj3.el (egg-edep): Likewise.
-
-	* egg/wnn.el (egg-edep): Likewise.	
-	* egg/wnnrpc.el: Use symbol.
-
-	* menudiag.el (menudiag-mode-map): Bug fix for boundary conditions.
-	(menudiag-make-selection-list): Bug fix in case of many items.
-
-	(menudiag-forward-item, menudiag-backward-item,
-	menudiag-goto-line): Change so that it wraps.
-
-	* its.el (egg-edep): Required.
-	(its-keydef): Require unconditioanlly.
-	(its-mode-map): Don't call its-define-select-keys here.
-	(its-mode-map): Use of symbol as keymap.
-	(its-fence-invisible): New variable.
-	(its-put-cursor): Don't call its-define-select-keys.
-	(its-setup-fence-mode): invisible handling and its-define-select-keys.
-	(its-keyseq-acceptable-p): if (CDR SYL) is number, return NIL.
-	(define-its-state-machine): Introduce its-temporaly-map.
-	(define-its-state-machine-append): Likewise.
-
-	(its-goto-state): Use symbol as keymap, not directly.
-
-	(its-set-part-1,its-set-part-2): New function.
-	(its-delete-backward-within-SYL): Conditionalize.
-
-	* egg.el (egg-edep): Required.
-	(egg-mode): Add remove-hook call.
-	Supply NIL as first argument to egg-set-conversion-backend.
-	make-local-hook for input-method-activate-hook.
-	(egg-set-face): Add optional argument OBJECT.
-	(egg-redraw-face): Bind inhibit-point-motion-hooks.
-
-	* egg.el (set-buffer-multibyte): Move to egg-edep.el.
-
-	* egg-mlh.el (mlh-space-bar-backward-henkan): Use assq.
-
-	* egg-com.el (egg-zhuyin-syllable): compatibility change.
-	(encode-fixed-euc-china-region): Removed maxlen.
-
-	Really Needed? -- gN.
-	* egg-com.el (egg-pinyin-syllable): Check exact match.
-	(egg-zhuyin-syllable): Likewise.
-
-	* egg-cnv.el (egg-edep): Required.
-	(its-keydef): Not required.
-	(egg-conversion-map): Don't call its-define-select-keys here.
-	Fset it to use symbol instead of the map directly.
-
-	(egg-get-bunsetsu-info): Add new optional argument for getting
-	property.
-	(egg-start-conversion-other-languages): set egg-conversion-backend.
-	(egg-set-current-backend): Use assq instead of assoc.
-	(egg-get-conversion-face): Likewise.
-	(egg-conversion-invisible): New variable.
-	(egg-convert-region): Change for open/close delimiter.
-	(egg-chinese-sisheng-regexp): New function.
-	(egg-separate-languages): Use egg-chinese-sisheng-regexp,
-	use symbol for language specifier (instead of string).
-
-	(egg-charset-to-language): Use symbol for language specifier
-	(instead of string).
-	(egg-next-chinese-lang): Likewise.
-
-	(egg-next-part-lang): Change the arguments.
-
-	(egg-make-bunsetsu): New function changing egg-insert-bunsetsu.
-
-	(egg-separate-characters): compatibility changes.
-
-	(egg-conversion-wrap-select): New Variable.
-
-	(egg-next-candidate): Can wrap around.
-
-	(egg-decide-before-point): Rewritten.
-	(egg-abort-conversion): Back to previous one.
-	(egg-select-candidate): Use egg-make-bunsetsu.
-
-	* egg-edep.el: New File for handling differences between Emacs version.
-	* its/thai.el: New File.
-	* its/hangul.el: Updated.
-
-1998-06-26  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* Makefile (install): Don't touch .emacs and leim-list.el
-	directly.  User should do it by her hand.
-	Reported by SAKAI Kiyotaka <ksakai@netwk.ntt-at.co.jp>
-
-1998-06-25  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* egg/canna.el (canna-dictionary-specification): "user" instead of
-	("user").  Should chnage canna-filename later.
-	Reported by Akio Morita <amorita@bird.scphys.kyoto-u.ac.jp>.
-
-1998-04-02  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* egg-com.el (comm-unpack-u16-string): Call string-as-multibyte.
-	(comm-unpack-mb-string): Likewise.
-
-	* egg.el (set-buffer-multibyte): Function for Emacs 20.2.
-
-	* egg/wnn.el (wnn-open): Call set-buffer-multibyte.
-	* egg/sj3.el (sj3-open): Ditto.
-	* egg/canna.el (canna-open): Ditto.
-
-1998-04-02  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	Implement hilight.
-	* egg.el (egg-mark-list, egg-suppress-marking): New Variables.
-	(egg-set-face, egg-mark-modification, egg-redraw-face): New
-	Functions.
-	* its.el (its-buffer-ins/del-SYL): Call egg-set-face.
-	(its-setup-yanked-portion): Likewise.
-	* egg-cnv.el (egg-insert-bunsetsu): Call egg-set-face.
-
-	* egg.el (egg-mode): set default backend.
-	* egg-mlh.el (mlh-space-bar-backward-henkan): activate input
-	method.
-
-1998-04-02  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* egg-cnv.el (egg-decide-bunsetsu): Undo changes of 03-16.
-	(egg-abort-conversion): Call egg-end-conversion.
-	(egg-decide-before-point): Call egg-end-conversion widh ABORT=NIL.
-
-1998-03-16  NIIBE Yutaka  <gniibe@chroot.org>
-
-	CANNA Support.
-	* egg/canna.el, egg/cannarpc.el: New file.
-	* Makefile (SRCS): Added.
-
-	* egg-cnv.el (egg-end-conversion): Add argument ABORT.
-
-	* egg/wnn.el (wnn-end-conversion): Follow the change of 
-	EGG-END-CONVERSION.
-	* egg/sj3.el (sj3-end-conversion): Likewise.
-
-1998-03-15  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* Makefile: Add dependencies for its-keydef.elc.
-	* egg/sj3rpc.el (sj3-open): Don't support list of hosts.
-	* its.el (its-exit-mode, its-kick-convert-region): Bug fix.  Call
-	its-input-end and its-put-cursor.
-	(its-exit-mode-off-input-method): Removed. 
-
-1998-03-14  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	* docomp.el (its-keydef): Undo the changes of 03-09.  its.el
-	is fixed.
-
-	* egg-cnv.el (egg-current-language): New valiable.
-	(egg-bunsetsu-info): Separate bunsetsu-info and lunguage.
-	(egg-conversion-backend-other-languages
-	egg-init-other-languages
-	egg-start-conversion-other-languages
-	egg-get-bunsetsu-converted-other-languages
-	egg-get-bunsetsu-source-other-languages
-	egg-list-candidates-other-languages
-	egg-get-number-of-candidates-other-languages
-	egg-get-current-candidate-number-other-languages
-	egg-get-all-candidates-other-languages
-	egg-decide-candidate-other-languages
-	egg-change-bunsetsu-length-other-languages
-	egg-end-conversion-other-languages
-	egg-fini-other-languages): New valiable and functions for
-	handling unknown language.
-	(egg-set-current-backend): Set egg-conversion-backend-other-languages
-	when backend for specified language isn't found.
-	(egg-start-reverse-conversion): New function for reverse conversion.
-	(egg-set-conversion-backend-internal): Removed.
-	(egg-set-conversion-backend): Args are changed.
-	(egg-get-conversion-face): New function for different face for
-	every language.
-	(egg-convert-region): Make converting text read-only. Handle
-	unknown laguages and backend opening error. Rename its-lang to
-	egg-lang.
-	(egg-separate-languages): Argument use-context is added to
-	utilize context when called by its-yank. Rename its-lang to
-	egg-lang Improve speed.
-	(egg-charset-to-language): Renamed from egg-char-to-language.
-	(egg-next-part-lang egg-next-chinese-lang): Rename its-lang to
-	egg-lang.
-	(egg-conversion-map): Unbind C-\ and /. Bind C-X RET XXX to
-	its-select-XXX.
-	(egg-insert-bunsetsu): Make conversion text read-only. Separate
-	bunsetsu-info and conversion-backend. 
-	(egg-insert-bunsetsu-list): Remove redundant variables.
-	(egg-beginning-of-conversion-buffer): New function.
-	(egg-end-of-conversion-buffer): New function.
-	(egg-enlarge-bunsetsu): Handle read-only text.
-	(egg-next-candidate): Handle read-only text. Bug on no candidate
-	bunsetsu is fiexed.
-	(egg-reconvert-bunsetsu-internal egg-reverse-convert-bunsetu
-	egg-reconvert-bunsetsu): New functions for reverse conversion and
-	re-conversion.
-	(egg-decide-before-point egg-abort-conversion): Handle read-only
-	text. Bug on pinyin and zhuyin mixed conversion is fixed. Allow
-	long fence.
-	(egg-select-candidate): Handle read-only text. Bug on no candidate
-	bunsetsu is fiexed.
-
-	* egg-com.el: Change coding-system from internal to iso-2022-7bit.
-
-	* egg-mlh.el (mlh-space-bar-backward-henkan): Disable temporally
-	mode selection.
-
-	* egg.el (egg-mode): Set cureent lang to conversion backend.
-	(egg-set-mode-line-title): Renamed to its-set-mode-line-title
-	and moved to its.el.
-	(egg-check-language): Removed.
-
-	* egg/sj3.el (sj3-server-port): Change from defconst to defver for
-	user customization.
-	(sj3-open sj3-get-environment): Try opening alternate servers.
-	(sj3-start-conversion): Make second argument LANGUAGE optional.
-	(egg-activate-sj3): Parameters of egg-set-conversion-backend is
-	changed.
-
-	* egg/sj3rpc.el (sj3rpc-error-message): New constant (Not yet
-	completed).
-	(sj3rpc-get-error-message): Check range of errno to avoid
-	args-out-ou-range error.
-
-	* egg/wnn.el (wnn-jport wnn-cport wnn-tport wnn-kport): New
-	variables for user customization.
-	(wnn-server-info-list wnn-server-port): Type of fourth element
-	is changed from integer to symbol.
-	(wnn-start-reverse-conversion): New function.
-	(wnn-open wnn-get-environment): Try opening alternate servers.
-	(egg-activate-wnn): Parameters of egg-set-conversion-backend is
-	changed.
-
-	* its-keydef.el (its-current-language): Moved to its.el.
-	(its-make-select-func): Remove language check (egg-check-language).
-	Add temporally mode selection.
-	(its-do-list-make-select-func): Binding of zhuyin-tw is changed to
-	`C' because conflicting zenkaku-upcase.
-
-	* its.el (its-current-select-func its-previous-select-func): New
-	variables for temporally mode selection.
-	(its-keydef requiring): Use eval-when to avoid error on using
-	compiled file.
-	(its-get-fence-face): New function for different face for
-	every language.
-	(its-put-cursor its-setup-fence-mode): Make fence read-only.
-	(its-start): Remove force-mode-line-update calling.
-	(its-restart): Add optional argument set-prop.
-	(its-self-insert-char its-backward-SYL its-forward-SYL
-	its-delete-SYL its-delete-backward-SYL its-exit-mode
-	its-delete-backward-SYL-by-keystroke its-transpose-chars
-	its-kick-convert-region its-end-of-input-buffer): Handle read-only
-	fence.
-	(its-state-machine): Accept special actions to handle temporally
-	mode selection.
-	(its-buffer-ins/del-SYL its-ins/del-SYL-batch): Handle read-only
-	fence. Property its-lang is renamed to egg-lang.
-	(its-get-next-state its-make-next-state): Add type check to avoid
-	wrong-type-argument error.
-	(its-keyseq-acceptable-p): Save informations of its-map to avoid
-	confusing on temporally mode selection.
-	(its-defrule-select-mode-temporally): New macro.
-	(its-kill-line its-cancel-input): New function.
-	(its-delete-backward-within-SYL): Bind its-current-language to
-	avoid confusing when undo is done beyond language change.
-	(its-yank its-yank-pop its-setup-yanked-portion): New functions.
-	(its-exit-mode-internal): Reset temporally selected mode. Allow
-	long fence.
-	(its-kick-convert-region-or-self-insert): New function.
-	(its-translate-region): Remove text properties completly.
-	(its-set-mode-line-title): Moved from egg.el and renamed.
-	(its-select-mode-temporally its-select-previous-mode): New functions
-	for temporally mode selection.
-
-	* leim-list-egg.el: Secondary argument for egg-activate-sj3/wnn
-	is no longer needed.
-
-	* its/hira.el: Remove the rule for "~" which destroies the rules
-	with its-hankaku-escape.
-
-	* its/pinyin.el: Implement its-pinyin-cn-enable-quanjioao-alphabet
-	and its-pinyin-tw-enable-quanjioao-alphabet.
-
-	* its/hangul.el: Implement its-hangul-enable-quanjioao-alphabet.
-
-	* its/ascii.el: New file.
-	* its/erpin.el: New file.
-	* its/hankata.el: New file.
-	* its/jeonkak.el: New file.
-	* its/kata.el: New file.
-	* its/quanjiao.el: New file.
-	* its/zenkaku.el: New file.
-	* its/zhuyin.el: New file.
-
-1998-03-14  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* egg/sj3rpc.el (sj3rpc-close): New function.
-
-	* egg/sj3.el (sj3bunsetsu-[sg]et-kugiri-changed): Rename from
-	sj3bunsetsu-get-stdy-down.
-	(sj3-end-conversion): Implement CLSTDY.
-	(sj3-fini): Implemented.
-
-1998-03-10  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* egg/sj3.el (sj3-end-conversion): Implement bunsetsu study.
-	CLSTDY not yet.
-
-	* egg/sj3rpc.el (sj3rpc-get-bunsetsu-candidates-sub): Bug fix.
-	Always add hiragana and katakana candidates.
-	(sj3-const: CLSTDY, CLSTDY_EUC): Renamed from END and END_EUC
-	according to "sj3cmd.h" of SJ3 distribution.
-	(sj3rpc-bunsetsu-stdy, sj3rpc-kugiri-stdy): New functions.
-
-	* egg-com.el (comm-format-u8-vector): New substitution.
-	(comm-format): New format 'v'.
-
-1998-03-09  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* docomp.el (its-keydef): Require its-keydef when compile.
-	Not so good.  Just a work around.
-	(its-mode-map): Undo the changes of 03-04.
-	
-1998-03-09  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	* its.el (its-translate-region): Make it command.
-	(its-translate-region-internal): Make it function.
-
-1998-03-04  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its.el (its-define-select-keys of its-mode-map): Comment it out.
-	* its-keydef.el (its-make-select-func): Add eval-when to compile this.
-
-	* egg-cnv.el (egg-decide-bunsetsu): Deleted.
-	* its.el (its-restart): Call its-setup-fence-mode with no argument.
-
-	* its.el (its-keyseq-acceptable-p): Bug fix.
-
-1998-03-03  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	*its.el (its-get-keyseq-syl): Compensate when DSYL has back.
-	(its-DSYL-with-back-p): New function. Return t when DSYL has back.
-	(its-concrete-DSYL-p): New function. Return t when DSYL is cons
-	form which means input is not continued after DSYL was created.
-	(its-make-concrete-DSYL): New function.
-	(its-self-insert-char): Make DSYL to ``concrete-DSYL'' if cursor
-	is t which means input is not continued.
-	(its-input): Test input key is whether acceptable or not when
-	its-barf-on-invalid-keyseq is non-nil.
-	(its-input-to-vsyl): Set cursor status, not just returning it.
-	(its-state-machine its-state-machine-keyseq): Make sure to issue
-	``DSYL-with-back'' when syllable is decided by the rule with back.
-	``test mode'' is added.
-	(its-keyseq-acceptable-p): New function.
-	(its-forward-SYL): The args order of put-text-property was wrong.
-	(its-delete-backward-SYL-by-keystroke): New function.
-	(its-delete-backward-within-SYL): ``delete-by-keystroke'' mode
-	did not work when syllable is decided by the rule with back.
-	Deletion limit is extended to outside of SYL (meaning of
-	``within-SYL'' is changed to ``deletion starts within SYL).
-	(its-transpose-chars): Fixed up.
-	(its-in-fence-p): Confuse at openning fence.
-
-1998-02-25  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	* its.el (its-put-cursor): Enable its-map change in fence mode.
-
-	* its-keydef.el (its-make-select-func): Same as above.
-
-1998-02-25  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	* its.el (its-set-cursor-status): New function.
-	(its-setup-fence-mode): New function.
-	(its-insert-fence-open its-insert-fence-close): Deleted.
-	(its-start, its-restart, its-self-insert-char): Avoid fence
-	destruction on its-barf.
-	(its-input-to-vsyl, its-state-machine, its-state-machine-keyseq,
-	its-buffer-ins/del-SYL, its-ins/del-SYL-batch): Update cursor
-	status on updating syllables.
-	(its-input-error): New function to realize doc-string of
-	its-barf-on-invalid-keyseq.
-
-	* egg.el (egg-mode): Don't use egg-mode-line-title which cause
-	wrong-type-argument at isearch.  Bind its-select-XXX to key only
-	when modefull is select.
-
-	* egg-mlh.el (mlh-hangul, mlh-zhongwen, mlh-zhongwen-tw): Same
-	as above.
-
-	* its-keydef.el (its-make-select-func): Same as above.
-
-	* leim-list-egg.el: Same as above.
-
-1998-02-24  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	* its.el (its-state-machine-keyseq): Remove binding
-	its-barf-on-invalid-keyseq to nil.
-	(its-ins/del-SYL-batch): Avoide altering its-XXX-map.
-	(its-translate-region-internal): its-translation-result's data
-	type is changed to string.
-
-	* egg-cnv.el (egg-convert-region): Gather contiguous same
-	language part.
-
-1998-02-21  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	* its.el (its-ins/del-SYL-batch): Set its-lang property.
-	(its-translate-region): Remove its-lang property from translated
-	text.
-	(its-translate-region-internal): New function.  Retain its-lang
-	property on translated text.
-
-	* egg-mlh.el (mlh-space-bar-backward-henkan): Force base language
-	to Japanese.
-
-	(mlh-hangul mlh-zhongwen-tw mlh-zhongwen): New functions for
-	conversion functions.
-
-1998-02-20  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	* its.el (its-restart): New function.
-	(its-insert-fence-open, its-insert-fence-close): New function.
-	(its-start): Rewritten.  Use its-insert-fence-open and
-	its-insert-fence-close.
-	(its-exit-mode-internal): Leave its-syl property.
-	(its-exit-mode-internal): Delete the property in this case.
-	(its-keydef): Require it.
-
-	* its-keydef.el: Provide the feature.
-
-	* egg-cnv.el (egg-convert-region): Add egg-source property to save 
-	the source string.
-	(egg-conversion-map, \C-c): New keybind.
-	(egg-get-previous-bunsetsu): Bug fix.
-	(egg-decide-before-point): New implementation.
-	(egg-exit-conversion): Use gg-decide-before-point.
-	(egg-abort-conversion): New command.
-
-1998-02-20  NIIBE Yutaka  <gniibe@akebono>
-
-	* Makefile (SRCS), Egg.prj: Remove euc-china.el.
-	* egg-com.el: Include egg-china.el.
-	* egg-china.el: Removed.
-
-1998-02-18  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* Egg.prj: Use PRCS.
-
-	* Makefile (SRCS): Rename euc-cn.el to euc-china.el
-	* egg-mlh.el (mlh-space-bar-backward-henkan): Put "Japanese"
-	language property for text.
-
-1998-02-18  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	* euc-china.el: Rename from euc-cn.el.  Update.
-
-	* egg.el (egg-mode): Bug fix.  Call get-exit-conversion.
-	* leim-list-egg.el ("japanese-egg-wnn", "japanese-egg-sj3"): 
-	Use new definition (with language argument).
-	* egg/wnn.el (egg-activate-wnn): 
-	* egg/sj3.el (egg-activate-sj3): 
-	
-1998-02-17  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* Makefile (SRCS): Add its/pinyin.el, its/hangul.el and
-	its-keydef.el.
-
-	* egg-com.el (ccl-encode-fixed-euc-kr): Fixed the name.
-	
-1998-02-17  KATAYAMA Yoshio <kate@pfu.co.jp>
-	
-	* its-keydef.el: New file.
-	* its/hangul.el, its/pinyin.el: New version.
-
-	* egg/wnnrpc.el (load-library "egg/wnn"): Comment it out.
-	(wnnrpc-get-error-message): Support multiple languages.
-	(wnnrpc-call-with-environment): Chinese support.
-
-	* egg/wnn.el (wnn-support-languages): New const.
-	(<env>): Add <server-type>, <dic-set>, and <rev-flag>.
-	(wnnenv-get-server-type, wnnenv-get-dictionary-set,
-	 wnnenv-get-reverse-flag): New substs.
-	(wnnenv-get-daibunsetsu-info, wnnenv-set-daibunsetsu-info): Changed.
-	(wnn-server): Removed.
-	(wnn-jserver, wnn-cserver, wnn-tserver, wnn-kserver): New custom.
-	(wnn-server-info-list): New const.
-	(wnn-get-server-info): New function.
-	(wnn-server-locale, wnn-server-type, wnn-server-port,
-	 wnn-server-stream-name, wnn-server-buffer-name,
-	 wnn-server-coding-system, wnn-server-hostname): New substs.
-	(wnn-start-conversion): Add new arguments.
-	(wnn-uniq-candidates): Initialize 'n'.
-	(wnn-change-bunsetsu-length): Simplefied.
-	(wnn-change-bunsetsu-length): Call renbunsetsu-conversion,
-	instead.
-	(wnn-fini, wnn-comm-sentinel): back to 971009 version.
-	(wnn-jserver-port): Removed.
-	(wnn-open): Argument change.  Support languages.
-
-	(wnn-dictionary-specification): Removed.
-	(wnn-dictionary-specification-list): New variable.
-	(wnn-get-dic-spec, wnn-dic-spec-dic-set, wnn-dic-spec-reverse,
-	wnn-dic-spec-name, wnn-dic-spec-param, wnn-dic-spec-fuzokugo,
-	 wnn-dic-spec-dic-list): New substs.
-	(wnn-get-environment): Rewrite.
-	(wnn-create-environment): Rewrite.
-
-	(egg-activate-wnn): Support languages.
-
-	* egg/sj3rpc.el (load-library "egg/sj3"): Don't load it.
-
-	* egg/sj3.el (sj3-support-languages): New const.
-	(sj3-start-conversion, sj3-fini): Add lang.
-	(sj3-change-bunsetsu-length): Simplified.
-	(egg-activate-sj3): Support language.
-
-	* its/hira.el (its/hira): Packagefy. (?)
-	(its-hira-map): Add language spec.  Move here the escape keys
-	("Z", "~").
-
-	* leim-list-egg.el ("chinese-gb-egg-wnn-py", "chinese-gb-egg-wnn-zy",
-	 "chinese-cns-egg-wnn-py", "chinese-cns-egg-wnn-zy",
-	 "korean-egg-wnn"): New input methods.
-
-	* its.el (its-current-language): New Local Variables.
-	<map>: Change the structure.  Add <language>.
-	(its-get-language): New substitution.
-	(its-set-indicator): Removed.
-	(its-get-indicator, its-get-start-state): New implementation.
-	(its-reset-start-state): Removed.
-	(its-buffer-ins/del-SYL): Add new properties, its-map and its-lang.
-	(its-exit-mode-internal): Change for its-map and its-lang.
-	(its-in-fence-p): New function.
-
-	("its-keydef.el"): Load it.
-
-	(its-select-map-menu): Removed.
-	(its-select-map-from-menu): Removed.
-	(its-select-hiragana, its-select-katakana, its-select-downcase,
-	its-select-upcase, its-select-zenkaku-downcase,
-	its-select-zenkaku-upcase, its-select-map, its-zenkaku-escape,
-	its-hankaku-escape): Removed.
-
-	(define-its-state-machine): Rewrite.
-	(define-its-compiled-map): New macro.
-	(its-define-state-machine): Removed.
-
-	(its-forward-SYL): Cleanup.
-
-	(its-beginning-of-input-buffer): Fix.
-	(its-end-of-input-buffer): Likewise.
-
-	* egg-com.el (egg-fixed-euc, egg-mb-euc): New Local Variables.
-	(ccl-decode-fixed-euc-kr, ccl-encode-fixed-euc-kr): New CCLs.
-	(fixed-euc-kr): New coding system.
-	(comm-format-mb-string, comm-format-u16-string): Support EUC-KR.
-	(comm-unpack-u16-string, comm-unpack-mb-string): Likewise.
-
-	* egg-cnv.el (egg-get-bunsetsu-info): New function.
-	(egg-conversion-backend-alist, egg-finalize-backend-alist): 
-	New Variables.
-	Make egg-conversion-backend buffer local.
-	(egg-set-current-backend): New function.
-	(egg-initialize-backend): Call egg-set-current-backend.
-	(egg-start-conversion): Add new argument LANGUAGE.
-	(egg-finalize-backend): Finalize for all backend(s).
-	(egg-set-conversion-backend-internal): New Macro.
-	(egg-convert-region): Support multiple languages in the region.
-	(egg-separate-languages, egg-char-to-language, egg-next-part-lang,
-	egg-next-chinese-lang): New functions.
-	(egg-insert-bunsetsu-list): Change the meaning of last argument.
-	(egg-shrink-bunsetsu): Simplified.  Just call egg-enlarge-bunsetsu.
-	(egg-enlarge-bunsetsu): Support shrink.
-
-	(egg-decide-bunsetsu, egg-next-candidate, egg-select-candidate): 
-	Use egg-get-bunsetsu-info.
-
-	(egg-insert-bunsetsu): The property now includes
-	egg-conversion-backend.
-
-	* egg.el: Don't load its/hira and don't set its-current-map.
-
-	* egg.el (egg-default-language, egg-support-languages): New Variables.
-	(egg-last-method-name, egg-mode-line-title): New Local Variables.
-	(egg-set-mode-line-title, egg-check-language): New functions.
-	(egg-set-support-languages): New function.
-	(egg-mode): Final processing: call its-exit-mode, call
-	egg-exit-conversion.
-	Changing the arguments, remember last input method.
-
-	Bug fix. Don't set its-hira-period and its-hira-comma.
-
-1998-02-17  KAWABATA, Taichi
-
-	* menudiag.el (menudiag-mode-map): New binds for new commands.
-	(menudiag-beginning-of-items, menudiag-end-of-items): New commands.
-	(menudiag-make-menu-formatted-string): Bug fix.  Use 
-	menudiag-item-num-to-char.
-	(menudiag-goto-item): Rewrite.  Better user interface.
-	(menudiag-char-to-item-num, menudiag-item-num-to-char): New
-	functions.
-
-1998-02-07  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
-
-	* leim-list-egg.el: Delete autoload setting for `egg-mode'.
-	Delete input method registration for "japanese-egg".
-
-	* egg.el: Comment out setting for Wnn.
-
-	* leim-list-egg.el: Add autoload setting for
-	`egg-activate-{wnn|sj3}'.
-
-	* egg/sj3.el (egg-activate-sj3): Add DOC-string.
-
-	* egg/sj3.el (egg-activate-sj3): New function.
-	Require egg.
-	Load egg/sj3rpc.el.
-
-	* egg/wnn.el (egg-activate-wnn): New function.
-	Require egg.
-	Load egg/wnnrpc.el.
-
-1998-02-07  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
-
-	* leim-list-egg.el (japanese-egg-wnn): New input method.
-	(japanese-egg-sj3): New input method.
-
-1997-11-20  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
-
-	* leim-list-egg.el: Rename `egg-ja' -> `japanese-egg'.
-
-1997-11-20  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
-
-	* egg/wnn.el (wnn): New group.
-	(wnn-server): Use `defcustom'.
-	(wnn-usr-dic-dir): Use `defcustom'.
-
-	* egg.el (egg): New group.
-
-1997-11-20  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
-
-	* menudiag.el (menudiag-mode-map): Swap binding for left and
-	right.
-
-	* egg.el (egg-toroku-region): `wnn-get-environment' requires
-	dictionary-specification.
-
-	* leim-list-egg.el: add autoload setting for egg-mode.
-
-1997-11-03  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	* euc-cn.el: New file.  Original name was yincoding.el.
-	Adopted by NIIBE Yutaka  <gniibe@chroot.org>.
-	
-1997-11-03  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its.el (its-start): Add INVISIBLE property if ITS-FENCE-FACE.
-	* egg-cnv.el (egg-decide-before-point): Ditto.
-	Based on patch by Kenichi HANDA <handa@etl.go.jp>.
-
-	Once, I thought that we need many environments which correspond to
-	outstanding CONVERSION buffre.  However, I've learned that WNN4
-	protocol is completely independent.  It's no use to maintain each
-	environment.  Share the one environment.
-	* egg/wnn.el (wnn-environments): Removed.  
-	(wnn-environment): New variable.
-	(wnn-comm-sentinel): Follow the change.  Let users know the close.
-	(wnn-fini): Likewise.
-
-	<env>: Remove the member <in-use>.
-	(wnnenv-create): Follow the structure change.
-	(wnn-end-conversion): Likewise.
-	(wnnenv-get-in-use-flag, wnnenv-set-in-use-flag): Removed.
-	(wnn-find-env-not-in-use): Removed.
-	(wnn-get-environment): Use wnn-environment instead of wnn-environments.
-	Take one argument.
-
-	* egg-cnv.el (egg-decide-before-point): Signal error on first SYL.
-	Reported by KATAYAMA Yoshio <kate@pfu.co.jp>.  Changes of 1997-09-07
-	was not enough.
-	Set-marker M to NIL after PUT-TEXT-PROPERTY.
-
-	Because the name of identifier begins egg-*, change the file names.
-	* tamago: Rename from tamago.
-	* egg.el, egg-mlh.el, egg-com.el, egg-cnv.el: Rename from tamago-*.el
-	* Makefile: Follow the changes.
-
-1997-10-05  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* tamago/wnn.el (wnn-uniq-candidates): Add new argument BUNSETSU.
-	Call WNN-BUNSETSU-SET-ZENKOUHO-POS, WNN-BUNSETSU-SET-ZENKOUHO in
-	this function.  Handle the case where BUNSETSU is not the first
-	element of BUNSETSU-LIST.
-	(wnn-list-candidates): Use new API of WNN-UNIQ-CANDIDATES.
-
-	* tamago-cnv.el (egg-next-candidate): Handle the case where
-	EGG-LIST-CANDIDATES returns non zero value.
-
-1997-10-04  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* Makefile (install): Install to SITEDIR.
-
-1997-09-26  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its/hira.el (its-hira-enable-zenkaku-alphabet): New variable.
-	(its-hira-map): Use it.
-
-1997-09-19  NIIBE Yutaka  <gniibe@chroot.org>
-
-	Arrange for LEIM.  Use tamago/ subdirectory.
-	* tamago/: Rename from tamago-lib.
-
-1997-09-18  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* tamago-cnv.el (egg-select-candidate): menu-select -->
-	menudiag-select. 
-	* tamago.el (egg-toroku-region,	egg-hinshi-select): Likewise.
-
-	* tamago-cnv.el (egg-exit-conversion): Run hook of
-	input-method-after-insert-chunk-hook.
-	* its.el (its-exit-mode-internal): Ditto.
-
-	* tamago-mlh.el (mlh-comma-period-style): Deleted.
-
-	* its/, tamago-lib/: New directory.
-	* its/: Move its-*.el files here.
-	* tamago-lib/: Move sj3.el, sj3rpc.el, wnn.el and wnnrpc.el here.
-
-	* tamago-com.el: Rename from comm.el.
-	* tamago-mlh.el: Rename from mlh.el.
-	* tamago-cnv.el: Rename from convert.el.
-
-	* menudiag.el: Rename from menu.el.
-	(Throughout): Rename menu-* to menudiag-*.
-
-1997-09-07  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* egg.el (egg-insert-after-hook, egg-exit-hook): Removed.
-	(egg-sai-henkan-start, egg-sai-henkan-end, egg-old-bunsetu-suu):
-	Removed.
-
-	* wnn.el (WNN-const): New macro.
-	(wnn-start-conversion, wnn-open-dictionary, wnn-open-frequency,
-	wnn-set-dictionary-sub, wnn-update-frequency): Use it.
-
-	* wnnrpc.el (wnn-const): New macro.
-	Throughout: Use wnn-const.
-
-	* convert.el (egg-decide-before-point): Bug fix.  Handle the case
-	where all bunsetsu are decided.
-	Reported by KATAYAMA Yoshio <kate@pfu.co.jp>.
-
-	* convert.el (egg-exit-conversion): Call egg-end-conversion at end.
-	(egg-decide-before-point): Ditto.
-
-	* wnn.el (wnn-environments): Change the structure of enviromnents.
-	(wnn-fini): Handle errors.
-	(wnn-open): Set sentinel.  Delete buffer on failure.
-	(wnn-comm-sentinel): New function.
-	(wnn-find-env-not-in-use): Return nil when not found.
-
-	(wnn-create-environment): Take username as argument.
-	(wnn-get-environment): Follow the change.
-
-	(wnnenv-create): Remove useless serial no.
-	(wnnenv-get-in-use-flag, wnnenv-set-in-use-flag): Follow the change.
-	(wnnenv-get-daibunsetsu-info, wnnenv-set-daibunsetsu-info): Likewise.
-	(wnn-create-environment, wnn-get-environment): Likewise.
-
-1997-09-04  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its.el (its-state-machine-keyseq): Bug fix.  Handle VSYL.
-
-	* sj3.el, sj3rpc.el: New files.
-
-	* comm.el (comm-call-with-proc, comm-call-with-proc-1): New macros.
-	* wnnrpc.el (wnnrpc-call-with-proc, wnnrpc-call-with-proc-1): Deleted.
-	Throughout: Use comm-call-with-proc and comm-call-with-proc-1.
-
-1997-09-03  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* wnnrpc.el (wnnrpc-call-with-proc-1): Bug fix.  let --> progn.
-
-	* convert.el (egg-conversion-backend): Initail value is NIL.
-
-	* wnn.el (wnn-conversion-backend): New constant.
-
-	* comm.el (comm-format,comm-unpack): Support multibyte string.
-	(comm-format-mb-string): New substitution.
-	(comm-unpack-mb-string): New substitution.
-
-	* wnn.el (wnn-fini): Handle the case where wnn-environments is nil.
-	Reported by Hisashi Miyashita <himi@bird.scphys.kyoto-u.ac.jp>.
-
-1997-09-03  Hiroshi Ogata <hiroshi@nereid.rim.or.jp>
-
-	* mlh.el (mlh-zenkaku): Use new API of Emacs-20,
-	japanese-zenkaku-region.
-
-1997-09-02  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* egg.el (egg-toroku-region): New function.
-
-	* wnn.el (wnn-list-dictionaries): New function.
-	(wnnenv-get-proc): New function.
-
-	* wnnrpc.el (wnndic-get-id, wnndic-get-comment, wnndic-get-dictname): 
-	New substitution.
-	(wnnrpc-get-writable-dictionary-id-list): Rename from
-	wnnrpc-get-writable-dictionary-list.
-
-1997-09-01  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* convert.el (egg-decide-bunsetsu): New function.
-	(egg-decide-before-point): New command.
-	(egg-exit-conversion): Use egg-decide-bunsetsu.
-
-	* its.el (its-start): Divide the fence buffer into two parts and
-	make them intangible, so that point goes appropriate position.
-	(its-put-cursor): The cursor belongs to part-2.
-	(its-buffer-ins/del-SYL): The new SYL belongs to part-1.
-	(its-exit-mode-internal): Remove the property on exit.
-	(its-beginning-of-input-buffer): Make SYLs have property of "part 2".
-	(its-backward-SYL): Likewise.
-	(its-forward-SYL): Make SYLs have property of "part 1".
-	(its-end-of-input-buffer): Likewise.
-
-	(its-input-end): Delete useless argument.
-	(its-beginning-of-input-buffer, its-exit-mode,
-	its-exit-mode-off-input-method, its-kick-convert-region,
-	its-end-of-input-buffer, its-backward-SYL, its-forward-SYL,
-	its-delete-SYL): Follow the change.
-
-1997-08-31  NIIBE Yutaka  <gniibe@chroot.org>
-
-	For egg-mode, don't use minor mode, override local map instead.
-	For its-mode and egg-conversion-mode, don't use minor mode,
-	instead use local-map of text property.
-
-	Although overriding local map is not good, using local-map of
-	property is natural thing.  Besides, point-left/point-entered
-	don't work as I expected (yet).
-
-	* egg.el (egg-mode: variable): Removed.
-	* egg.el (egg-modefull-map, egg-modeless-map): Make them functions.
-	Generate overriding local map.
-	* egg.el (egg-mode): use overriding local map.
-
-	* its.el, convert.el: Undo changes of 1997-08-28 for minor mode
-	and local map of text properties.
-
-	* its.el (its-exit-mode-off-input-method): New function.
-
-1997-08-29  NIIBE Yutaka  <gniibe@chroot.org>
-
-	Let Undo work correctly.
-	* its.el (its-self-insert-char): Delete/Insert cursor.
-
-	* its.el (its-put-cursor): Remove useless first argument.
-	(its-start, its-beginning-of-input-buffer, its-end-of-input-buffer,
-	its-backward-SYL, its-forward-SYL, its-delete-SYL, its-delete-SYL,
-	its-delete-backward-SYL-internal, its-delete-backward-within-SYL): 
-	Follow the change.
-
-1997-08-28  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	* its-erpin.el: New file.
-	* its-pinyin.el: New file.
-	* its-zhuyin.el: New file.
-
-1997-08-28  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its.el (its-exit-mode-no-egg): Removed.
-	(its-exit-mode-internal): Remove first argument.
-	(its-kick-convert-region, its-delete-SYL,
-	its-delete-backward-SYL-internal, its-delete-backward-within-SYL):
-	Follow the change.
-
-	Don't use local map of text properties, instead use minor mode.
-	* convert.el (egg-conversion-mode): New minor mode.
-	(egg-conversion-left, egg-conversion-enter): New functions.
-	(egg-insert-bunsetsu): remove local-map, add point-entered and
-	point-left properties.
-	(egg-exit-conversion): Likewise.
-	(egg-exit-conversion): Exit minor mode.
-
-	* its.el (its-put-cursor): remove local-map, add point-entered and
-	point-left properties.
-	(its-enter, its-left): New functions.
-	(its-mode): New variable.  New minor mode.
-
-1997-08-27  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* convert.el (egg-exit-conversion-no-egg): Removed.
-	(egg-exit-conversion): No argument, no egg-mode.
-
-	* convert.el (egg-convert-region): No egg-flag.
-	* its.el (its-exit-mode-internal): Follow it.
-	* mlh.el (mlh-space-bar-backward-henkan): Ditto.
-
-1997-08-26  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* wnn.el (wnn-change-bunsetsu-length): Don't use magic #3.
-
-	* convert.el (egg-insert-bunsetsu-list): Add optional argument
-	CONTIN.
-
-1997-08-25  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* convert.el (egg-insert-bunsetsu): Include seperator.  Add
-	intangible property to bunsetsu.
-	(egg-insert-bunsetsu-list): Follow the change.
-	(egg-backward-bunsetsu, egg-forward-bunsetsu, 
-	egg-select-candidate, egg-next-candidate, 
-	egg-shrink-bunsetsu, egg-enlarge-bunsetsu, 
-	egg-exit-conversion): Ditto.
-
-	* mlh.el (mlh-space-bar-backward-henkan): Call egg-convert-region
-	with last argument t.  Turn of egg-mode.
-
-1997-08-24  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its.el (its-exit-mode-internal): Inactivate input method.
-
-	* wnn.el (wnn-end-conversion): Change the interface.
-	(wnn-update-frequency): Follow the change.
-	* convert.el (egg-exit-conversion): Follow the change.
-
-	* wnn.el (wnn-start-conversion): Change the return value interface.
-	* convert.el (egg-convert-region): Follow the change.
-
-	* wnn.el (wnnenv-get-bunsetsu-pos, wnnenv-set-bunsetsu-pos): Removed.
-	(wnn-get-bunsetsu-source-afterwards): Removed.
-	(wnn-get-number-of-bunsetsu, wnn-get-bunsetsu-info): Removed.
-	(wnnenv-get-bunsetsu-list, wnnenv-set-bunsetsu-list): Removed.
-	(wnn-start-conversion): Don't call wnnenv-set-bunsetsu-list.
-	(wnn-end-conversion): Ditto.
-
-1997-08-23  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* convert.el (egg-change-bunsetsu-length): Change the interface.
-	(egg-shrink-bunsetsu,egg-enlarge-bunsetsu): Follow it.
-
-	(egg-source-maxlen-from-here): Removed.
-	(egg-get-previous-bunsetsu): New function.
-	(egg-select-candidate, egg-shrink-bunsetsu, egg-enlarge-bunsetsu,
-	egg-next-candidate): Use egg-get-previous-bunsetsu.
-
-1997-08-20  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* egg.el (minor-mode-alist): Don't show " EGG" in mode line.
-	(egg-mode): Use input method indicator instead.
-
-1997-07-20  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* convert.el (egg-next-candidate): Rename from egg-next-conversion.
-	(egg-previous-candidate): Rename from egg-previous-conversion.
-	(egg-select-candidate): Follow the change of new interface.
-	(egg-source-maxlen-from-here): Likewise.
-
-1997-07-19  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* wnn.el (wnn-start-conversion): Change the interface.  Return ENV
-	and the	list of bunsetsu.  Fix the documentation string too.
-	* convert.el (egg-convert-region): Follow the change.
-	(egg-insert-converted-result): Change the argument.
-	(egg-insert-bunsetsu-list): Rename from egg-insert-converted-result.
-	(egg-insert-bunsetsu): New function.
-	(egg-get-number-of-bunsetsu,egg-get-bunsetsu-info): Removed.
-	(egg-backward-bunsetsu): Don't use bunsetsu-pos.
-
-	* wnn.el (wnn-get-bunsetsu-converted): Change the interface.  Take
- 	BUNSETSU as the argument instead of ENV and POS.
-	* convert.el (egg-get-bunsetsu-converted): Follow the change.
-
-	* wnn.el (wnn-bunsetsu-create): Take ENV as the first argument.
-	(wnn-list-candidates): Dont take ENV.
-	(wnn-bunsetsu-get-env): New substitution.
-
-	* wnnrpc.el (wnnrpc-receive-sho-bunsetsu-list-sub): Take the argument
-	for ENV, and use it for the argument of wnn-bunsetsu-create.
-	(wnnrpc-receive-sho-bunsetsu-list): Take ENV as the first argument.
-	(wnnrpc-renbunsetsu-conversion): Follow the change.
-
-1997-07-17  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* convert.el (egg-decide-candidate):  Change the interface.
-	Take the argument bunsetsu-info instead of conversion-engine.
-
-	* wnn.el (wnn-get-candidate): Deleted.
-
-	* convert.el (egg-get-all-candidates): Change the interface.
-	Take an argument bunsetsu-info instead of conversion-engine.
-	(egg-select-candidate): Follow the change.
-
-	* convert.el (egg-set-bunsetsu-pos,egg-get-bunsetsu-pos): Deleted.
-	(egg-list-candidates,egg-get-current-candidate-number): New stub.
-	* wnn.el (wnn-bunsetsu-create): Add new member zenkouho-pos.
-	(wnn-bunsetsu-get-zenkouho-pos,wnn-bunsetsu-set-zenkouho-pos): New
-	functions.
-	(wnn-list-candidates,wnn-get-current-candidate-number): New functions.
-	(wnn-set-bunsetsu-pos,wnn-get-bunsetsu-pos): Deleted.
-
-	* convert.el (egg-get-number-of-candidates): Change the interface.
-	Take an argument bunsetsu-info instead of conversion-engine.
-	(egg-next-conversion,egg-select-candidate): Follow the change.
-	* wnn.el (wnn-get-number-of-candidates): Follow the change.
-
-	* wnn.el (wnn-get-bunsetsu-source-afterwards): New function.
-	(wnn-change-bunsetsu-length): Use it.
-
-	* convert.el (egg-get-bunsetsu-source): Change the interface.
-  	Take an argument bunsetsu-info instead of conversion-engine.
-	(egg-enlarge-bunsetsu,egg-shrink-bunsetsu,egg-source-maxlen-from-here):
- 	Follow the change.
-	* wnn.el (wnn-get-bunsetsu-source): Follow the change.
-
-	Put bunsetsu information on text property.
-	* wnn.el (wnn-get-bunsetsu-info): New function.
-
-	* convert.el (egg-insert-converted-result): Put it on text property.
-	(egg-conversion-backend): Add new interface
- 	wnn-get-bunsetsu-info.
-	(egg-get-bunsetsu-info): New stub.
-
-1997-07-17  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	* its.el (its-state-machine-keyseq, its-state-machine): Handle
-	end-of-input correctly when going backward.
-
-1997-07-16  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* wnn.el (wnn-create-directory): Bug fix.  Really make directory.
-
-1997-07-15  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its-hangul.el (its-define-hangul): Use its-defrule-otherwise.
-
-1997-07-15  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	* its-hangul.el: Updated.
-
-1997-06-19  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
-
-	* its-hira.el: its-hira-hankaku-escape --> its-hankaku-escape.
-	its-hira-zenkaku-escape --> its-zenkaku-escape.
-
-1997-06-14  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its.el: Change the data structure of <expr-output-back-list> so
- 	that it can encourage sharing same structure and it can use same
- 	structure of SYL.
-	(its-ins/del-SYL-batch): Follow the change of data structure.
-	(its-define-otherwise): Change the argument.
-	(its-defrule-otherwise): New function.
-	(its-eob-keyexpr, its-eob-back, its-make-class+back,
- 	its-make-otherwise): New substitutions.
-
-1997-06-13  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its-kana.el: New file.  Taken from its/kanainput.el of Mule-2.3.
-
-	* its-hira.el: Use `define-its-state-machine'.
-
-	* its.el (its-zenkaku-escape, its-hankaku-escape): Make them
- 	defconst.
-	(define-its-state-machine, define-its-state-machine-append): New
- 	macro.
-
-1997-06-13  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
-
-	* its-hira.el ("n'"): Added.
-
-1997-06-12  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
-
-	its-zenkaku-escape and its-hankaku-escape are also used in hangul.
-	* its.el (its-zenkaku-escape, its-hankaku-escape): Moved to here
-	and rename them.
-	* its-hira.el (its-hira-hankaku-escape, its-hira-zenkaku-escape): 
-	Removed.
-
-	* its.el (its-read-current-its-string): Removed.  There's the
- 	function `read-multilingual-string' already.
-
-1997-06-12  KATAYAMA Yoshio <kate@pfu.co.jp>
-
-	* its-hangul.el: New file.
-
-1997-06-10  NIIBE Yutaka  <gniibe@chroot.org>
-
-	Miscellaneous cosmetic changes.
-	* comm.el: New file.  Move communication related funcitons from
- 	wnnrpc.el.
-	(comm-format-u32c, and others): Rename from wnnrpc-*.
-	* wnnrpc.el (Throughout): Follow the rename.
-
-	* wnn.el (wnnenv-get-in-use-flag): Rename from wnn-e-get-in-use.
-	(wnnenv-set-in-use-flag): Rename from wnn-e-set-in-use.
-	(Others): Rename from wnn-e-*.
-	(wnn-bunsetsu-*): Rename from wnnrpc-b-*, and moved from wnnrpc.el.
-
-	* convert.el (egg-exit-conversion): Call egg-do-auto-fill.
-
-	* its.el (its-translate-region): Bug fix.  End of input.
-	(its-state-machine): Bug fix.  Generate error if
- 	its-barf-on-invalid-keyseq.
-	(its-exit-mode-internal): Call egg-do-auto-fill.
-
-	* wnnrpc.el (ccl-decode-fixed-euc-jp): Bug fix for ASCII.
-
-	* mlh.el (mlh-space-bar-backward-henkan): Call egg-do-auto-fill.
-
-	* egg.el: Comment out definition of C-\ in global-map.
-
-1997-06-09  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its.el (its-kick-convert-region): Rename from its-convert-region.
-	(its-mode-map): Follow the change.
-
-	(its-make-next-state): Use list instead of cons.
-
-	(its-get-kst/t): Make it substitution.
-	(its-set-kst, its-get-keyseq, its-set-keyseq, its-kst-p, 
-	its-get-output, its-set-output, its-get-keyseq-syl): Likewise.
-	(its-new-state, its-new-map, its-get-indicator, its-set-indicator,  
-	its-get-start-state, its-reset-start-state): Likewise.
-
-	(its-get-next-state): Use assq instead of assoc.
-
-	(its-goto-state): Tune up.
-
-1997-06-08  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* mlh.el: Merge mlh-nihongo.el.
-	* mlh-nihongo.el: Removed.
-
-	* its-hira.el: Moved from its/hira.el.  Move comments to HISTORY.
-	(its-hira-enable-double-n, its-hira-period, its-hira-comma,
- 	its-hira-open-bracket, its-hira-close-bracket,
- 	its-hira-horizontal): New variables.
-	Use the variables to define the state-machine.
-
-	Implement non-interactive translation in ITS.
-	* its.el (its-translate-region): New function.
-	(its-latest-SYL): New Variable.
-	(its-state-machine-keyseq): Use it.
-	(its-update-latest-SYL): New function.
-	(its-buffer-ins/del-SYL): Use it.
-	(its-translation-result): New variable.
-	(its-ins/del-SYL-batch): New function.
-	(its-enable-double-n-syntax, its-use-kuten-for-period,
- 	its-use-touten-for-comma, its-zenkaku-escape, its-hankaku-escape):
- 	Removed.
-
-	Use ITS, delete mlh's own implementation of automata.
-	* mlh.el (mlh-start-state, mlh-set-of-chars, mlh-start-state-sym,
-	mlh-set-of-chars-sym, mlh-define-automata, mlh-end-of-definition,
-	mlh-defrule, mlh-next-state, mlh-roma-kana-backward): Removed.
-	(mlh-cause-error-when-unknown-romaji-sequence): Removed.
-	(mlh-atoi): Removed.
-	(mlh-white-space, mlh-zenkaku-white): Use string-to-int.
-	* mlh-nihongo.el (mlh-hira-start-state, mlh-hira-chars, and all
- 	rules of definition which defines the automaton): Removed.
-	(mlh-kanji-with-henkan-region-function): Use its-translate-region.
-	(mlh-hiragana, mlh-katakana): Likewise.
-
-	Fix of CCL.
-	* wnnrpc.el (ccl-decode-fixed-euc-jp): Bug fix for jisx0212.
-	Add missing parens.
-
-	Speed up of unpacking.
-	* wnnrpc.el (wnnrpc-following-char-or-wait): Tune up.
-	(wnnrpc-following+forward-char): New function.
-	(wnnrpc-unpack-u32c, wnnrpc-unpack-u32, wnnrpc-unpack-u16,
- 	wnnrpc-unpack-u8): Use it.
-	(wnnrpc-accept-process-output): New function.
-	(wnnrpc-unpack-u16-string, wnnrpc-unpack-u8-string,
- 	wnnrpc-unpack-bytes): Use it.  Use search-forward.
-	(wnnrpc-unpack-u16-string): Use decode-coding-region.
-
-1997-06-07  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* wnn.el (wnn-get-all-candidates): New function.
-	(wnn-set-bunsetsu-pos): Return 0 (instead of -1).
-
-	* convert.el (egg-get-candidate): Removed.
-	(egg-get-all-candidates): New entry function.
-	(egg-conversion-backend): Entry for egg-get-all-candidates.
-	(egg-select-candidate): New function.
-	(egg-conversion-map): Bind "\M-s" and egg-select-candidate.
-
-1997-06-05  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* bushu.el: Renamed from busyu.el.
-	(bushu-break-string, etc): Renamed from busyu*.
-
-	* menu.el: Completely rewritten.
-
-1997-06-03  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
-
-	* its.el (its-reset-start-state): Bug fix.  Delete a CDR.
-
-	Implement "class of key" transition.
-	Change the structure of <state>, the last member is
-	<key-state-table/terminal> instead of <key-state-alist/terminal>.
-	* its.el (its-kst-p): Rename from its-ksa-p.
-	(its-get-next-state): Follow the change of the data structure.
-	(its-state-machine): Likewise.
-	(its-make-next-state): Likewise.
-	(its-set-kst): New function.
-	(its-get-otherwise): New function.
-	(its-otherwise-match): New function.
-	(its-define-otherwise-terminate-here): Removed.
-	(its-define-otherwise): New function.
-	(its-defrule*): Use its-define-otherwise.
-
-	* its/hira.el (n): Use its-define-otherwise.
-
-1997-06-02  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* wnnrpc.el (wnnrpc-receive-sho-bunsetsu-list-sub,
- 	wnnrpc-receive-sho-bunsetsu-list-sub-2): Splited from
-	wnnrpc-receive-sho-bunsetsu-list.
-	(wnnrpc-receive-dai-bunsetsu-list): New function.
-	(wnnrpc-daibunsetsu-conversion, wnnrpc-get-daibunsetsu-candidate): 
-	New function.
-
-1997-06-01  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* wnnrpc.el (ccl-decode-fixed-euc-jp): Clean it up.
-	(wnnrpc-file-attribute): Rename from wnnrpc-stat-file.
-	(wnnrpc-get-dictionary-list-with-environment): Rename from
-	wnnrpc-get-dictionary-list-with-environment.
-
-	Implement RPC more.
-	* wnnrpc.el (wnnrpc-who, wnnrpc-get-env-list, wnnrpc-kill,
- 	wnnrpc-delete-dictionary, wnnrpc-set-flag-on-dictionary,
- 	wnnrpc-get-dictionary-list, wnnrpc-delete-word,
- 	wnnrpc-receive-word, wnnrpc-search-word,
- 	wnnrpc-search-word-in-dictionary, wnnrpc-get-word-info,
- 	wnnrpc-set-comment-on-word, wnnrpc-get-dictionary-info,
- 	wnnrpc-set-file-comment, wnnrpc-hinshi-name,
- 	wnnrpc-set-file-password, wnnrpc-set-hinshi-table): New functions.
-
-1997-05-31  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* wnnrpc.el (wnnrpc-format-u32c, wnnrpc-unpack-u32c): New
- 	substitutions.  Support 32-bit number represented in cons cell of
- 	a pair of 16-bit integer.
-	(wnnrpc-format, wnnrpc-unpack): Handle u32c (U).
-
-	(wnnrpc-format-bytes, wnnrpc-unpack-bytes): New substitutions.
-  	Support byte stream end with 255(-1).
-	(wnnrpc-format, wnnrpc-unpack):  Handle bytes (B).
-
-	(wnnrpc-local-file-loaded): New function.
-	(wnnrpc-call-with-proc-1): New macro.  Assume the buffer is the one
-	of process.
-
-1997-05-29  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* wnnrpc.el (wnnrpc-get-conversion-parameters, wnnrpc-file-loaded,
- 	wnnrpc-write-file, wnnrpc-get-fuzokugo-file, wnnrpc-get-file-list,
- 	wnnrpc-get-file-list-with-env, wnnrpc-stat-file,
- 	wnnrpc-get-file-info): New functions.
-	wnnrpc-receive-file-list): New subst.
-
-1997-05-29  Kenichi Handa  <handa@etl.go.jp>
-
-	* wnnrpc.el (ccl-decode-fixed-euc-jp): Tune it up.
-
-1997-05-29  Hisashi Miyashita  <himi@bird.scphys.kyoto-u.ac.jp>
-
-	* wnnrpc.el (fixed-euc-jp, ccl-decode-fixed-euc-jp,
-	ccl-encode-fixed-euc): New private coding system.  Encode/decode
-	CCL for it.
-
-1997-05-27  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* wnnrpc.el (wnnrpc-tanbunsetsu-conversion): Change the argument.
-	(wnnrpc-get-bunsetsu-candidates): Likewise.
-	(wnnrpc-renbunsetsu-conversion): Likewise.
-
-	* wnn.el (wnn-change-bunsetsu-length): Follow the change.
-	(wnn-set-bunsetsu-pos): Likewise.
-	(wnn-change-bunsetsu-length, wnn-start-conversion): Likewise.
-
-1997-05-25  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* wnnrpc.el (wnnrpc-add-word, wnnrpc-get-dictionary-list,
-	wnnrpc-receive-dictionary-list, wnnrpc-get-writable-dictionary-list,
-	wnnrpc-get-hinshi-list, wnnrpc-hinshi-number): New functions.
-	(wnnrpc-unpack-u16-string): Bug fix for the case of ASCII string.
-
-	* wnn.el (wnn-dictionary-specification): Add dictionaries of
-	gerodic and ones of WNN consortium.
-
-	Implement a false path.
-	* wnnrpc.el (wnnrpc-renbunsetsu-conversion): Generate an error on
- 	failure.
-	(wnnrpc-get-bunsetsu-candidates): Ditto.
-	(wnnrpc-tanbunsetsu-conversion): Ditto.
-
-	Implement a false path.  Error recovery.
-	* wnn.el (wnn-create-directory, wnn-open-dictionary,
- 	wnn-open-frequency, wnn-query-del/create-frequency): New function.
-	(wnn-set-dictionary-sub): New function.
-
-1997-05-24  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* wnnrpc.el (wnnrpc-version, wnnrpc-access, wnnrpc-mkdir,
- 	wnnrpc-create-dictionary, wnnrpc-create-frequency, 
-	wnnrpc-discard-file, wnnrpc-remove-file): New functions.
-	(wnnrpc-test-result-and-get-error): New subst.
-
-	Implement a false path from wnnrpc-set-fuzokugo-file.
-	* wnnrpc.el (wnnrpc-set-fuzokugo-file): Return negate-encoded
- 	error code on failure.
-	* wnn.el (wnn-create-environment): Generate an error message.
-
-	Implement a false path from wnnrpc-open-file.
-	* wnnrpc.el (wnnrpc-open-file): Change the interface.  Return
-	negate-encoded error code on failure.
-	* wnn.el (wnn-open-file): New function.
-	(wnn-create-environment): Handle return value, and generate
-	an error message for wnnrpc-set-fuzokugo-file on failure.
-	(wnn-set-dictionary): Handle return value.
-
-1997-05-17  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* wnnrpc.el (wnnrpc-error-message): Error strings taken from
- 	Wnn-4.2 distribution.
-	(wnnrpc-errono): Removed.
-
-	Implement a false path from wnnrpc-open.
-	* wnnrpc.el (wnnrpc-open): Change the interface.  Return NIL on
- 	success, error code on failure.
-	* wnn.el (wnn-open): Delete process and buffer.
-	Generate an error on failure.
-	(wnn-get-environment): Follow the change (none).
-	(wnn-start-conversion): Follow the change (none).
-	* convert.el (egg-convert-region): Follow the change.  Call
- 	delete-region after egg-start-conversion.
-
-	Implement a false path from wnnrpc-connect.
-	* wnnrpc.el (wnnrpc-connect): Change the interface.  Return
- 	negate-encoded error code on failure.
-	* wnn.el (wnn-create-environment): Generate an error on failure.
-	(wnn-get-environment): Follow the change.  On failure, don't
-	register the environment to wnn-environments.
-
-1997-05-16  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
-
-	Dynamically allocate environment arbitrarily.
-	* wnn.el (wnn-create-environment): Change the structure of ENV.
-	(wnn-e-get-in-use, wnn-e-set-in-use): New subst.
-	(wnn-end-conversion): Call wnn-e-set-in-use.
-	(wnn-get-environment, wnn-find-env-not-in-use): New function.
-	(wnn-start-conversion): Call wnn-get-environment.
-
-	* wnn.el (wnn-fini): Implemented.
-
-1997-05-15  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* convert.el (egg-start-conversion): Change the interface.
-	(egg-convert-region): Follow the change.
-	(egg-open-if-not): Removed.
-	* wnn.el (wnn-start-conversion): Follow the change.
-
-	* wnn.el (wnn-environment-list): Removed.
-	(wnn-environment-serial): Removed.
-	(wnn-connect-and-init): Removed.
-	(wnn-environments): New variable which holds all environments.
-
-1997-05-15  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
-
-	* wnn.el (wnn-change-bunsetsu-length): Bug fix.  Last argument to
- 	wnnrpc-b-set-freq-down is list of bunsetsu.
-
-	* mlh.el (mlh-do-spacing): Emacs 20 related changes.  
-	Use category-set-mnemonics, and char-category-set.
-	According to suggestion by Kenichi Handa <handa@etl.go.jp>.
-
-1997-05-15  MORIOKA Tomohiko <morioka@jaist.ac.jp>
-
-	* wnn.el (wnn-usr-dic-dir): New variable.
-	(wnn-filename): Use wnn-usr-dic-dir.
-
-	* its.el (its-defrule): New argument `enable-overwrite'.
-
-1997-05-14  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* convert.el (egg-exit-conversion-unread-char): Use newer variable
- 	unread-command-events, as unread-command-char is obsolete.
-	(egg-shrink-bunsetsu, egg-source-maxlen-from-here,
- 	egg-enlarge-bunsetsu, egg-next-conversion, egg-exit-conversion,
- 	egg-exit-conversion, egg-insert-converted-result): New property
- 	EGG-CONVERSION-ENGINE, which specifis backend.
-
-	(egg-start-conversion, egg-get-number-of-bunsetsu,
- 	egg-get-bunsetsu-converted, egg-set-bunsetsu-pos,
- 	egg-get-bunsetsu-pos, egg-get-number-of-candidates,
- 	egg-get-candidate, egg-decide-candidate,
- 	egg-change-bunsetsu-length, egg-get-bunsetsu-source,
- 	egg-end-conversion): Change the interface, new argument c.
-	* wnn.el (wnn-start-conversion, wnn-get-number-of-bunsetsu,
-	wnn-get-bunsetsu-converted, wnn-set-bunsetsu-pos, 
-	wnn-get-bunsetsu-pos, wnn-get-number-of-candidates, 
-	wnn-get-candidate, wnn-decide-candidate, 
-	wnn-change-bunsetsu-length, wnn-get-bunsetsu-source, 
-	wnn-end-conversion): Likewise.
-
-	* convert.el (egg-open-if-not): Change the interface.  Return
- 	conversion backend.
-
-	* wnnrpc.el (wnnrpc-following-char-or-wait, wnnrpc-unpack-u32,
- 	wnnrpc-unpack-u16, wnnrpc-unpack-u8, wnnrpc-unpack-u16-string,
- 	wnnrpc-unpack-u8-string): Change the interface to avoid
- 	compilation warnings.
-	(wnnrpc-unpack): Use new interface.
-
-	* wnn.el (wnn-open): Change the name of WNN buffer as debug has
- 	been done.
-
-1997-05-11  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* wnnrpc.el (wnnrpc-following-char-or-wait): Rename from
- 	wnn-following-char-or-wait.
-	(wnnrpc-following-char-or-wait): Declare with DEFUN instead of
- 	DEFSUBST.
-
-1997-05-10  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* Throughout: Use JUNET coding system for file format.
-
-	* mlh.el: Move some comments to HISTORY.
-	(mlh-version): Removed.
-	Remove all autoload entries.
-	(henkan-region-function): Removed.
-	(member): Don't need any more.
-
-	* mlh-nihongo.el: Renamed from nihongo.el.
-
-	* mlh.el (mlh-space-bar-backward-henkan): call egg-convert-region
- 	directly.
-	(mlh-space-bar-backward-henkan): Fix for Emacs 20.
-	Don't call egg:do-auto-fill.
-	(mlh-backward-henkan): Use set-marker-insertion-type.
-	(mlh-do-spacing): Char-category.
-
-	* mlh.el, nihongo.el: Taken from mlh-1.002 distribution.
-
-1997-05-07  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* convert.el (egg-update-frequency): Removed.
-	(egg-conversion-backend): Remove entry for update-frequency.
-
-	* wnn.el (wnn-dictionary-specification): Change parameters
-	according to suggestion by Tomoko Yoshida in mule-jp@etl.go.jp.
-	Original had been taken from wnn-4.2.
-
-1997-05-06  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* convert.el (egg-next-conversion): Bug fix.  It's max+ instead of n.
-
-1997-05-05  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* wnnfns.c (Fwnn_get_bunsetsu_converted): Rename from
-	get-converted-bunsetsu.
-	(Fwnn_get_bunsetsu_source): Ditto.
-	* convert.el (egg-get-bunsetsu-converted): Ditto.
-	(egg-get-bunsetsu-source): Ditto.
-
-	* wnn.el (wnn-create-environment): New file which mimics API of
-	wnnfns.c.
-
-1997-04-29  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* wnnrpc.el: New file which implements Remote Procedure Calls of WNN.
-
-1997-04-16  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its/kanainput.el (normal-pair): Use its-defrule*.
-
-	* its.el (its-defrule*): Rewritten.
-
-	* its/hira.el ("n"): Alternative implementation using 'otherwise'.
-
-	* its.el (its-processing-map): Removed.
-	(its-register-map): Rename from its-set-map.
-	(its-register-map): Remove first argumet NAME.
-	(its-defrule): Remove last optional argument END.
-	(its-define-otherwise-terminate-here): New function.
-	(its-goto-state): New function.
-	(its-defrule, its-defoutput): Use its-goto-state.
-
-1997-04-12  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its.el: Enhance meaning of ITS state machine.  Now, <key>
- 	includes representation of "ANY of key stroke" (-2).
-	(its-defrule): New feature end=='otherwise.
-	(its-defrule*): New function.
-	(its-state-machine): Implement otherwise-terminate-before-this-key.
-
-	* its/kanainput.el (its-k-zenkaku-escape, its-k-hankaku-escape,
- 	its-k-symbols-escape): Add prefix its-.  Let them defconst.
-	"W": Move the definition beginning to avoid error.
-
-1997-03-26  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* convert.el (egg-next-conversion): -1 goes to end of bunsetsu.
-
-1997-03-25  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* egg.el (egg-mode-on, egg-input-mode, egg-in-fence-mode): Deleted.
-	(egg-fence-face-on, egg-fence-face-off): Deleted.
-	(egg-region-start, egg-region-end): Deleted.
-
-1997-03-24  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its/hira.el ("n"): Add "z" and "?" for prefetch char of "n".
-
-	Implement conversion mode.
-	* convert.el: New file.
-
-1997-03-23  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its.el (its-mode-map): As "\C-g" is used in global-map, use
- 	"\C-]" instead (for its-cancel-input).
-
-1997-03-22  NIIBE Yutaka  <gniibe@chroot.org>
-
-	Introduce new scheme to specify server.
-	* wnnfns.c (Qjserver, Qcserver, Qtserver, Qkserver): Removed.
-	(Vwnn_server_type): Integer variable.
-	(wnn_get_server_type): Renamed from wnn_check_server_type.
-	(charset_wnn_server_type): Renamed from lc_wnn_server_type.
-
-	Introduce new scheme to specify uniqueness.
-	* wnnfns.c (Qwnn_no_uniq, Qwnn_uniq, Qwnn_uniq_kanji): Removed.
-	(Vwnn_uniqueness_specifier): Integer variable.  Renamed from
-	wnn_uniq_level.
-
-1997-03-21  NIIBE Yutaka  <gniibe@chroot.org>
-
-	Cosmetic changes.
-	* wnnfnc.c (Throughout): Change Lisp function name to follow the
- 	format of wnn-VERB-OBJECT.
-	Use XFASTINT instead of XINT, if appropriate.
-	
-	* wnnfns.c (Fwnn_fuzokugo_set): Merged with wnn-set-fuzokugo of
- 	wnn-egg.el.
-
-	* wnn-egg.el (wnn-set-fuzokugo): Deleted.
-
-	* wnnfns.c (Fwnn_dict_add): Merged with wnn-add-dict of wnn-egg.el.
-	* wnn-egg.el (wnn-add-dict): Deleted.
-
-	* wnn-egg-msg.el (wnn-msg-get): Renamed from egg-msg-get.
-	(wnn-message-alist): Renamed from egg-message-alist.
-	Use defconst.
-
-	* wnnfns.c (wnn_check_server_type): Renemed from
- 	check_wnn_server_type.
-
-	* wnn-egg-msg.el (egg-error): Deleted.  Not useful enough.
-	* wnn-egg.el (Throughout): Replace egg-error by error.
-
-	* egg.el (egg-sai-henkan-start, egg-sai-henkan-end,
- 	egg-old-bunsetu-suu): Moved from wnn-egg.el.
-
-	* wnn-egg.el (Throughout): Change variable name and function name.
-	Added wnn- prefix, egg- prefix.
-	* wnn-egg.el: Delete historical defaliases.  Only support 
-	wnn-set-[cjk]server-hostname.
-
-	* wnn6.el: New file.  Discriminate Wnn6 related functions.
-	* eggrc-wnn6: New file.  Discriminate Wnn6 related setting.
-
-	* egg-fence.el: Removed.
-
-1997-03-20  NIIBE Yutaka  <gniibe@chroot.org>
-
-	Distingush continuation of egg-mode and turn off of egg-mode.
-	* its.el (its-mode-map): Bind "\C-\\" to its-exit-mode-no-egg.
-	(its-exit-mode-internal): New argument egg-mode-flag.
-	(its-exit-mode-no-egg): New Function.
-
-	Rethink about keymap.  Once, the intention of egg-mode-map has
- 	been to override ALL of the keymap.  That's so selfish, and not
- 	friendly to other parts of Emacs.  This implementation intend to
-	be more friendly with other keymaps.
-	* its.el (its-mode-map): Remove definition of "\C-c" for
- 	its-cancel-input, as C-c has special meaning in Emacs.  We should
- 	not re-define it.  
-	Remove definition of "\C-q" for its-select-previous-map.  
-	Remove definition of "\C-_" for egg-jis-code-input.  
-	Remove definition of "\C-w", "\C-@", [?\C-\ ] for
- 	egg-henkan-fence-region.
-
-	Implement START/CURSOR/END scheme.
-	* its.el (its-input-to-vsyl): New function.
-	(its-beginning-of-input-buffer): New function.
-	(its-end-of-input-buffer): New function.
-	(its-backward-SYL): New function.
-	(its-forward-SYL): New function.
-	(its-delete-SYL): New function.
-	(its-delete-backward-SYL): New function.
-	(its-delete-backward-SYL-internal): New function.
-	(its-delete-backward-within-SYL): New function.
-	(its-delete-by-keystroke): New Variable.
-	(its-exit-mode): New function.
-	(its-exit-mode-internal): New function.
-
-	* its.el (its-standard-map-list, its-find, its-next-map,
- 	its-previous-map): Deleted.
-	(its-get-indicator): Delete duplicated definition.  Leave one which
-	takes <map> argument.
-	(its-input): Rename from its-input-subsubsub.
-
-	* egg.el (egg-mode-map): Don't include SPACE.
-
-	Introduce CURSOR.
-	* its.el (its-state-machine): Add new argument EMIT.  Return CURSOR.
-	(its-state-machine-keyseq): Likewise.
-	(its-input-subsubsub): Return CURSOR.
-	(its-input-subsub): Deleted.
-	(its-DSYL-p): Deleted.
-	(its-buffer-insert-SYL-list): Deleted.
-	(its-buffer-ins/del-SYL): New function.
-	(its-input-end): Change the argument to P of point, and return VOID.
-
-	Change structure of <map>.  <start-state> is normal <state>.
-	(its-new-map): Follow the change of structure.
-	(its-get-indicator, its-set-indicator, its-reset-start-state): 
-	Likewise.
-	(its-reset-start-state): Renamed from its-reset-start.
-
-	Don't use <input-buffer>, but introduce new scheme of SYL property.
-	(its-change-t-to-nil, its-nil-index, its-bytes-between,
- 	its-delete-between, its-move-nil--->, its-move-nil-<--,
- 	its-move-nil-<--sub, its-move-nil-to-last, its-move-nil-to-first):
-	Deleted.
-
-1997-03-19  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its.el: Change the structure of DSYL.  Same as <state>.
-	(its-input-subsub): Follow the change of structure.
-	(its-make-DSYL): Deleted.
-	(its-get-keyseq-cooked): New function.
-
-	Swap the meaning of T/NIL of <SYL>.
-
-	Delete the structure of <input-buffer>.
-	(its-new-input-buffer): Deleted.
-	(its-input-subsub): Remove the argument SYLP.
-	(its-input, its-input-sub, its-init-text-properties): Deleted.
-
-	Introduce START, END and CURSOR.
-
-1997-03-19  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
-
-	Global-map should be used, for key sequence not defined by
- 	its-mode-map and/or egg-mode-map.   Don't mask other maps.
-	* its.el (its-mode-esc-map): Deleted.
-	(its-mode-map): Include define-key of the esc-map here.
-	* egg.el (egg-mode-esc-map): Deleted.
-	(egg-mode-map): Include define-key of the esc-map here.
-	
-1997-03-18  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its.el (its-input): Rename from its-input-input-buffer.
-	(its-state-machine): Handle END of input (key == -1).
-
-	ITS minor mode deleted.  It's implemented by local-map of text
- 	properties.
-	(its-mode): Remove the variable.
-	(its-mode): Remove the function.
-
-	* its.el (<input-buffer>): Change the order of <SYL> list.  
-	(car sylp) is last entry of the list.
-	(its-input-buffer): Deleted.  It's now a member of text
- 	properties.
-	(<map>): Change the structure.  Start state should have "" for keyseq.
-	(its-get-start-state): Follow chage of the <map> structure.
-	(its-reset-start, its-set-indicator, its-get-indicator): Likewise.
-	(its-new-state, its-new-map): Split from its-new-state/map.
-	(its-make-map): Deleted.
-
-1997-03-17  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its.el (its-buffer-insert-SYL-list): Use insert-and-inherit to
- 	inherit properties.
-	(its-fence-overlay): Removed. Don't use overlay, as it has no
- 	information in undo-list.
-
-1997-03-16  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its/hira.el ("n"): Use new feature END.
-	("ppy", "bby", "ddy", "jjy", "zzy", "ggy", "lly", "rry", "hhy",
- 	"cch", "tts", "tty", "ssh", "ssy", "kky"): its-defoutput.
-
-	* its.el (its-defrule): Add argument END.
-	(its-buffer-delete-SYL): Bug fix. Use length instead of string-width.
-
-1997-03-15  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its.el (its-input-input-buffer): Implement the case of DSYL.
-
-1997-03-14  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its.el (its-buffer-delete-SYL): Handle the case of NIL.
-
-	* its/hira.el: Implement "kka" and others.  Implemlement "N".
-	(digit-characters, symbol-characters, downcase-alphabets,
- 	upcase-alphabets): Delete useless defvar-s.  
-
-1997-03-14  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
-
-	* its/hira.el ("roma-kana"): Follow change of implementation of
-	state machine.
-
-	Correct the abuse of the word "MODE".  It seems that it's direct
- 	influence of "mode" in Emacs, but it's not mode at all.
-	* its.el (its-map-alist): Renamed from its-mode-alist.
-	(its-get-map): Renamed from its-get-mode-map.
-	(its-set-map): Renamed from its-set-mode-map.
-	(its-define-state-machine): Renamed from its-define-mode.
-	(its-select-map-menu): Renamed from its-select-mode-menu.
-	(its-select-map-from-menu): Renamed from its-select-mode-from-menu.
-	(its-standard-map-list): Renamed from its-standard-modes.
-	(its-next-map): Renamed from its-next-mode.
-	(its-previous-map): Renamed from its-previous-mode.
-	(its-select-map): Renamed from its-select-mode.
-	(its-get-indicator): Renamed from its-get-mode-indicator.
-
-	(its-select-map-from-menu): As it's not mode, don't need offer hooks.
-	(its-next-map): Likewise.
-	(its-previous-map): Likewise.
-	(its-select-map): Likewise.
-
-	Change the implementation of its-mode-alist.  Name is in <map> now.
-	* its.el (its-get-mode-map): Just do assoc.
-	(its-set-mode-map): Simplified.
-
-	* its.el (its-get-indicator): Renamed from its-map-indicator.
-	(its-set-indicator): Renamed from its-map-set-indicator.
-	(its-get-start-state): Renamed from its-map-start.
-	(its-new-state): Change the argunents.
-	(its-map-set-start): Removed.
-	(its-reset-start): New function.
-
-	Remove old implemantation of translator.
-	* its.el (its-resize, its-maps, its-actions, its-inputs,
- 	its-level, its-maxlevel, its-char-from-buff, its-interactive):
- 	Removed.
-	(its-make-action, its-reset-maps, its-current-map,
- 	its-previous-map, its-level, its-enter-newlevel, its-reset-input,
- 	its-flush-input-before-point, its-peek-char, its-read-char):
- 	Removed.
-	(its-push-char, its-ordinal-charp, its-delete-charp): Removed.
-	(its-translate-region): Removed.
-	(its-buff-s, its-buff-e): Removed.
-	(its-state-terminalp): Removed.
-
-	Remove selection of candidates in map, it's questionable to
- 	implement this feature with SYL.  Might rethink in future.
-	(its-make-menu-from-map-result, its-make-alist-from-map-result):
- 	Removed.
-	(its-make-menu-from-map, its-make-menu-from-map*): Removed.
-	(its-make-alist-from-map, its-make-alist-from-map*): Removed.
-	(its-completing-read): Removed.
-	(its-minibuffer-local-must-match-map,
- 	its-minibuffer-local-completion-map): Removed.
-	(its-minibuffer-completion-help, car-string-lessp,
- 	its-temp-echo-area-contents): Removed.
-
-	Implement SYL-based state machine.
-	* its.el (its-input-buffer, its-barf-on-invalid-keyseq): New variables.
-	(its-new-input-buffer): New function.
-	(its-self-insert-char): New command.
-	(its-initial-ISYL, its-make-DSYL, its-make-VSYL,
- 	its-input-input-buffer, its-input-input-buffer-sub,
- 	its-state-machine, its-state-machine-keyseq, 
-	its-buffer-delete-SYL, its-buffer-insert-SYL-list,
- 	its-get-next-state, its-get-ksa/b, its-get-keyseq, its-ksa-p,
-	its-get-output): New function.
-	(its-get-KAS): Removed.
-	(its-get-state, its-get-action, its-set-action): Removed.
-	(its-make-KAS, its-get-KAS): Removed.
-
-	* its.el (its-defrule-sub): Merged into its-defrule.
-
-1997-03-13  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
-
-	* its.el: (its-define-mode): Change the arguments.
-	* its/zhuyin.el ("zhuyin"): Follow the changes of its-define-mode.
-	* its/zenkaku.el ("zenkaku-downcase"): Likewise.
-	* its/pinyin.el ("PinYin"): Likewise.
-	* its/kata.el ("roma-kata"): Likewise.
-	* its/kanainput.el ("kanainput"): Likewise.
-	* its/hira.el ("roma-kana"): Likewise.
-	* its/hankaku.el ("downcase"): Likewise.
-	* its/hangul.el ("hangul"): Likewise.
-	* its/han-kata.el ("roma-han-kata"): Likewise.
-
-	* its.el (its-action-output, its-action-next, its-get-next-map,
- 	its-set-next-map): Removed.
-	(its-make-next-state): New function.
-	(its-make-state): Removed.
-
-	* its.el (its-defrule-sub): Renamed from `its-defrule**'.
-
-	* wnnfns.h: New file.  Macros for WNN6 are defined here.
-	* wnn6fns.c: New file.  Moved from wnnfns.c for WNN6 specific
- 	functions.
-
-1997-03-12  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* wnnfns.c: cosmetic changes (indentation, commenting-out-style,
- 	and compare to Qnil, etc).
-	Get rid of "register" qualifier.
-
-1997-03-05  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its.el (its-define-mode): Change internal structure.  Completely
- 	rewritten.
-	(its-make-map): Function to make map.
-	(its-make-state): New function.  Make new state.
-	(its-make-KAS): New function.  Make Key-Action-State triad.
-	(its-state-terminalp): New function.  True when the state is
- 	terminal.
-	(its-map-indicator, its-map-set-indicator,): Changed.
-	(its-map-terminalp, its-map-incrementalp,
- 	its-map-set-incrementalp, its-map-alist, its-map-set-alist,
- 	its-map-action, its-map-set-action): Removed.
-
-	(its-defrule-verbose): Deleted.  Seems debug purpose variable.
-
-	(its-make-map): Removed <state>.  It was useless space eater.
-	(its-map-indicator, its-map-set-indicator, its-map-alist,
- 	its-map-set-alist, its-map-action, its-map-set-action): Follow the
- 	change.
-	(its-define-mode): Likewise.
-	(its-defrule**): Change the argument.  Delete STATE.
-	(its-defrule): Likewise.
-	(its-map-state, its-map-set-state): Removed.
-
-	<topmap>: Changed the structure.  Introduce <incrementalp>, which
- 	is t on hangul-map, zhuyin-map, and kanainput-map.
-	(its-define-mode): Change the arguments.  INDICATOR and RESET is 
-	always required.  Add new argument INCREMENTALP.
-	* its/kanainput.el ("kanainput"): Use new API of its-define-mode.
-	* its/hangul.el ("hangul"): Likewise.
-	* its/zhuyin.el ("zhuyin"): Likewise.
-	* its.el (its-make-terminal-state-sofar): Removed.
-	(its-default-make-terminal-state): Removed.
-	(its-make-terminal-state): Removed
-	(its-make-non-terminal-state): Removed.  Not used.
-	(its-map-incrementalp, its-map-set-incrementalp): New functions.
-	
-1997-03-04  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* its.el (its-defrule-conditional, its-defrule-conditional*):
- 	Removed.  Evaluating cond clause at runtime is stupid.  Rules
- 	should be determined at compile time, not at run time.
-	(its-get-action): Simplified.  It's always standard.
-	(its-make-terminal-state-sofar): Likewise.
-	(its-make-action): Renamed from its-make-standard-action.
-	(its-standard-actionp): Removed.  No use.
-	(its-translate-region): Simplified.
-
-	(its-map-topmap-p): Removed.  No use.
-
-	(its-simple-actionp, its-collect-simple-action): Removed. No use.
-
-	(its-insert-output-string, its-display-status-string): Removed.
-  	It seemd these variables is to debug ITS itself.
-	(its-translate-region): Simplified.
-	
-	* its/hira.el (".", ",", "n", "nn"): Rules should be determined at
- 	compile time.
-	* its/han-kata.el: Likewise.
-	* its/kata.el: Likewise.
-
-	* its.el (its-make-standard-action): Simplified.
-	(its-make-standard-action): Remove alternative output.
-	(its-standard-actionp): Simplified.
-	(its-action-next): Simplified.
-	(its-select-alternative-output-menu): Removed.  Not used at all.
-	(its-select-alternative-output): Ditto.
-
-	* its/han-kata.el, its/zenkaku.el, its/kata.el, its/kanainput.el,
- 	its/hira.el, its/hankaku.el: Add (require cl).
-
-	* its.el (its-enable-double-n-syntax, its-use-kuten-for-period,
- 	its-use-touten-for-comma, its-zenkaku-escape, its-hankaku-escape):
- 	Declare here.  Add prefix `its-'.  ):
-
-	(its-defrule, its-defrule*): Remove MAP argument.
-	Merged into its-defrule.
-
-1997-03-04  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
-
-	* its.el (its-completing-input-menu): Removed.  Not used.
-	(its-completing-input): Ditto.
-	(its-translate-region): Remove (null action) clause.  It's identical
-	to 't' case.
-
-	(its-map-supers): Deleted.
-	(its-map-set-supers): Ditto.
-	(its-get-next-map-locally): Deleted.
-
-	(its-define-mode): Remove supers.
-	(its-make-map): Likewise.
-
-	(its-simulate-input): sref -> aref. add char-bytes -> +1.
-	(its-defrule**): Likewise.
-
-	(its-flush-input-before-point): Delete useless save-excursion.
-	(its-push-char): Likewise.
-	(its-translate-region): Likewise.
-
-	* its/zhuyin.el (its-make-terminal-state):
-	* its/kanainput.el (its-make-terminal-state):
-	* its/hangul.el (its-make-terminal-state):
-	Use its-make-terminal-state-sofar.
-
-	* its/kanainput.el (its-make-terminal-state-kanainput): Removed.
-
-	* its.el (its-make-terminal-state-sofar): Renamed.
- 	(was: its-make-terminal-state-hangul)
-
-	* its/han-kata.el (its-select-hankaku-katakana): Renamed.
-	(was: its:select-hankaku-katakana).
-
-	* its.el (its-map-topmap-p, its-map-supers, its-map-set-supers,
- 	its-map-terminalp, its-map-state, its-map-set-state,
- 	its-map-indicator, its-map-set-indicator, its-map-action,
- 	its-map-set-action, its-map-alist, its-map-set-alist,
- 	its-get-action, its-action-output, its-action-next,
- 	its-get-next-map, its-get-next-map-locally, its-set-next-map,
- 	its-collect-simple-action, its-read-current-its-string,
- 	its-make-map): Add prefix 'its-'.
-
-	* its.el (its-defrule-select-mode-temporally): Deleted.
-	(its-select-mode-temporally): Deleted.
-	(its-select-previous-mode): Deleted.
-
-	* its/hira.el ("q", "Q"): Removed.
-
-	* its.el (its-defrule**): Don't call coerce-internal-string.
-	(map-state-string): Removed.
-	(its-default-make-standard-non-terminal-state): Don't call
- 	map-state-string.
-
-	* egg.el (characterp, coerce-internal-string, coerce-string): Removed.
-
-	* its.el (its-insert-char): Deleted.
-	(its-internal-mode-alist): Removed.
-	(its-set-mode-map, its-define-mode): Remove internalp.
-	(its-set-mode-indicator): Removed.
-
-	* egg-fence.el (egg-fence-self-insert-command): Add prefix 'egg-'.
-
-	* its.el (fence-self-insert-command): Move to egg-fence.el.
-
-	* egg-fence.el (egg-exit-fence-mode): Renamed (egg-fence-exit-mode).
-	(egg-enter-fence-mode-and-self-insert): Deleted.
-
-	* egg.el (egg-quit-egg-mode): Deleted.
-
-	* egg-misc.el (egg-fence-toggle-egg-mode): Add prefix 'egg-'.
-	(egg-fence-toggle-egg-mode): beep -> ding.
-	(global-map): bind C-\ to egg-enter-fence-mode.
-
-1997-03-02  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* egg-henkan.el: New file.
-
-	Use new API (egg-get-bunsetu-kanji, egg-get-bunsetu-yomi,
- 	egg-is-dai-bunsetu, bunsetu-suu, egg-hindo-update,
- 	egg-get-bunsetu-end).
-
-	* wnn-egg.el: Move egg-henkan-* to egg-henkan.el.
-
-	* wnn-egg.el (egg-startup-file-search-path): Remove current
- 	directory.
-	(egg-open-wnn): Renamed from EGG-open-wnn.
-	(bunsetu-suu): New function.
-	(egg-get-bunsetu-kanji, egg-get-bunsetu-yomi): New function.
-	(egg-is-dai-bunsetu): New function.
-	(egg-hindo-update): New function.
-	(egg-get-bunsetu-end): New function.
-	
-	(egg-henkan-region, egg-gyaku-henkan-region,
- 	egg-henkan-region-internal, egg-henkan-paragraph,
- 	egg-gyaku-henkan-paragraph, egg-henkan-sentence,
- 	egg-gyaku-henkan-sentence, egg-henkan-word, egg-gyaku-henkan-word,
- 	egg-henkan-insert-kouho, egg-henkan-kakutei,
- 	egg-henkan-kakutei-first-char, egg-henkan-kakutei-before-point,
- 	egg-sai-henkan, egg-henkan-goto-bunsetu,
- 	egg-henkan-forward-bunsetu, egg-henkan-backward-bunsetu,
- 	egg-henkan-first-bunsetu, egg-henkan-last-bunsetu,
- 	egg-henkan-hiragana, egg-henkan-katakana, egg-henkan-next-kouho,
- 	egg-henkan-next-kouho-dai, egg-henkan-next-kouho-sho,
- 	egg-henkan-previous-kouho, egg-henkan-previous-kouho-dai,
- 	egg-henkan-previous-kouho-sho, egg-henkan-goto-kouho,
- 	egg-henkan-bunsetu-chijime-dai, egg-henkan-bunsetu-chijime-sho,
- 	egg-henkan-bunsetu-nobasi-dai, egg-henkan-saishou-bunsetu,
- 	egg-henkan-saichou-bunsetu, egg-bunsetu-length-henko,
- 	egg-henkan-quit, egg-henkan-select-kouho,
- 	egg-henkan-select-kouho-dai, egg-henkan-select-kouho-sho,
- 	egg-henkan-word-off, egg-henkan-kakutei-and-self-insert,
- 	egg-henkan-mode-map, egg-henkan-mode-esc-prefix,
- 	egg-henkan-help-command, egg-henkan-inspect-bunsetu):
- 	Add prefix `egg-'.
-
-	(egg-henkan-mode-in-use): Deleted.
-	(set-egg-henkan-mode-format): Deleted.  Don't need.
-
-	(disconnect-wnn): Let it be normal function, instead of command.
-	(close-wnn): Ditto.
-
-	(set-jserver-host-name, set-kserver-host-name,
- 	set-cserver-host-name): Use defalias.
-
-	(close-wnn): Take an argument of wnn-server-type.
-	(wnn-egg-kill-emacs-function, set-wnn-host-name,
- 	set-cwnn-host-name, set-kwnn-host-name): Likewise.
-
-	* egg.el (egg-global-map-backup): Deleted.
-	(egg-local-map-backup): Deleted.
-	(egg-insert-after-hook): it's global variable, nod buffer-local.
-
-	* egg-fence.el (egg-henkan-fence-region, egg-enter-fence-mode,
- 	egg-fence-katakana, egg-fence-hiragana, egg-fence-hankaku,
- 	egg-fence-zenkaku, egg-fence-backward-char,
- 	egg-fence-forward-char, egg-fence-beginning-of-line,
- 	egg-fence-end-of-line, egg-fence-transpose-chars,
- 	egg-fence-delete-char, egg-fence-backward-delete-char,
- 	egg-fence-kill-line, egg-fence-exit-mode, egg-fence-cancel-input,
- 	egg-fence-mode-help-command): Add Prefix `egg-'.
-
-	(egg-fence-mode-map): Remove binding to eval-expression (C-z).
-
-	(egg-self-insert-non-undo-count): Removed.
-	(egg-self-insert-command): Removed.
-
-	(egg-fence-backward-char, egg-fence-forward-char,
- 	egg-fence-transpose-chars, egg-fence-delete-char,
- 	egg-fence-backward-delete-char): beep -> ding.
-	wnn-egg.el (egg-henkan-select-kouho): Likewise.
-
-1997-02-27  NIIBE Yutaka  <gniibe@chroot.org>
-
-	* wnn-egg.el (push-end, push-end-internal): Removed.
-
-	* its.el (dolist): Removed.  It's in CL package.
-	(for-each, for-each*): Removed.
-
-	* egg-keymap.el: Removed.  I guess noone use it.
-
-	* egg-jsymbol.el (*-alist): Declare by defconst.
-
-	* egg-misc.el (toggle-egg-mode): Removed.
-
-	* All files: Change the identifier XXX:YYYY --> XXX-YYYY,
-	and *YYY* ---> YYY.
-
-	* egg-fence.el (enter-fence-mode): Use new API for marker
- 	insertion `set-marker-insertion-type'.
-	* its.el (its-*buff-e*): Likewise.
-
-	* egg-jsymbol.el: lc-jp --> (charset-id 'japanese-jisx0208)
-	lc-jp2 --> (charset-id 'japanese-jisx0212).
-
-1997-02-26  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
-
-	* egg-fence.el (egg:fence-mode-map): Renamed from fence-mode-map.
-	(egg:fence-mode-esc-prefix): Renamed from egg:fence-mode-esc-map.
-	(henkan-fence-region-or-single-space): Removed.
-
-	* egg-misc.el (toggle-egg-mode): mc-flag
-	 	-> enable-multibyte-characters.
-
-	* its.el (read-current-its-string): New function.  Moved from
- 	wnn-egg-misc.el.
-	(In meny functions): beep --> ding.
-
-	* egg-misc.el (read-hiragana-string): Removed.
-	(read-kanji-string): Removed.
-	(egg:special-symbol-input): Renamed from special-symbol-input.
-	(egg:special-symbol-input-point): Renamed from
- 	special-symbol-input-point.
-	(si:*global-map*): Remeved.
-	Removed 'Changes on Global map'.
-	(its-mode-map): Renamed from mule-keymap.
-
-	* wnn-egg.el (henkan-region-internal): Use new API for undo.
-	(henkan-kakutei): Likewise.
-	(henkan-kakutei-first-char): Likewise.
-	(henkan-kakutei-before-point): Likewise.
-	(sai-henkan): Likewise.
-	* egg.el (egg:quit-egg-mode): Likewise.
-
-	* egg-fence.el (egg:*fence-open*, egg:*fence-close*,
- 	egg:*fence-face*): Let them be declared by defvar.
-	(egg:*fence-open-in-cont*, egg:*fence-close-in-cont*,
- 	egg:*fence-face-in-cont*): Likewise.
-
-	(set-egg-fence-mode-format): Removed.  Useless.  Don't need to be
- 	interactive.
-	(set-egg-fence-mode-format-in-cont): Removed.
-	(egg:*face-alist*): Removed.
-
-	* wnn-egg-misc.el (its:select-mode, its:select-mode-from-menu,
-	its:next-mode, its:previous-mode): 
-	Removed (Merged into its.el).  
-
-	* its.el (its:select-mode, its:select-mode-from-menu,
- 	its:next-mode, its:previous-mode): Call hook of
- 	`its:select-mode-hook'.
-
-	* diced.el: Removed.  This depends on wnn.  Functions are moved to
-	wnn-egg-dict.el.
-
-	* wnn-egg-dict.el (remove-regexp-in-string): Removed.
-	(toroku-region): Don't call `remove-regexp-in-string'.  Removing
- 	invalid sequence (TAB?) automatically is not good idea.  It should
- 	notify user.  Currently, just don't remove.
-
-	* busyu.el (busyu-table): defconst instead of defvar.
-	(busyu-kaku-alist): defconst instead of defvar.
-
-	* its.el (egg:member): Removed.  Not used.
-
-	* wnn-egg-msg.el (*egg-message-alist*): Include asking string in
- 	register-notify and remove-notify.  Should also change Korean and
- 	Chinese.
-
-	* egg.el: Removed "Tamago Notification System".
- 	It is useless, as we have *Messages* buffer in GNU Emacs 19.
-
-	* diced.el (diced-execute): Don't use `notify' but `message'.
-	(set-dict-comment): Likewise.
-	* its.el (its-defrule**): Likewise.
-	* wnn-egg-dict.el (egg:toroku-word): Likewise.
-	* wnn-egg-msg.el (egg:error): Likewise.
-	* wnn-egg.el (set-wnn-param): Likewise.
-	(EGG:open-wnn): Likewise.
-	(close-wnn): Likewise.
-	(henkan-word-off): Likewise.
-	(henkan-inspect-bunsetu): Likewise.
-
-	* diced.el (diced-execute): Don't use `notify-yes-or-no-p' but use
-	plain `yes-or-no-p' and format.
-	* wnn-egg-dict.el (egg:toroku-word): Likewise.
-
-	* egg.el (notify-yes-or-no-p-internal): IIDESUKA is not good.
-	it should get the message through egg:get-msg.  Currently, use
-	"OK?".
-	(notify-y-or-n-p-internal): Likewise.
-
-	* wnn-egg.el: Split into wnn-egg-dict.el, wnn-egg-misc.el, and
-	wnn-egg-msg.el.
-	(many functions): remove commented out line of
-	 	(open-wnn-if-disconnected).
-
-	* egg.el: Split into egg.el, egg-fence.el, egg-misc.el,
- 	jis-input.el, and modeline.el.
-
-	* wnn-egg.el (egg-default-startup-file): change to eggrc-wnn from
- 	eggrc.
-	(henkan-region-internal): Use new API for marker insertion
- 	`set-marker-insertion-type'.
-
-1997-02-13  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
-
-	* menu.el (menu:select-from-menu): Rewritten.
Index: ChangeLog.1997-1998
===================================================================
RCS file: ChangeLog.1997-1998
diff -N ChangeLog.1997-1998
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ChangeLog.1997-1998	25 Aug 2002 23:53:10 -0000	1.1
@@ -0,0 +1,2311 @@
+1998-07-12  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* egg-mlh.el (mlh-space-bar-backward-henkan): Don't test against
+	egg-conversion-backend-alist.
+
+	* egg/wnn.el (wnn-fini-lang): Reneme from wnn-fini.
+	(wnn-fini): New implementation calling wnn-fini-lang.
+
+	(wnn-close): Call wnn-fini-lang.
+	(wnn-dictionary-save): Ditto.
+
+	* egg/canna.el (canna-fini): Delete LANG argument.
+	* egg/sj3.el (sj3-fini): Ditto.
+
+	* egg-cnv.el (egg-set-conversion-backend): Removed.
+
+	* egg/sj3.el (sj3-start-conversion): Signal error on non-supported
+	language.
+	* egg/canna.el (canna-start-conversion): Likewise.
+	* egg/wnn.el (wnn-start-conversion): Likewise.
+
+	* egg-cnv.el (egg-convert-region): Add handler for
+	lang-not-supported.
+
+	* egg/wnn.el (egg-activate-wnn): load wnnrpc here conditionally.
+	* egg/sj3.el: Likewise.
+	* egg/canna.el: Likewise.
+
+	* egg.el (egg-support-languages, egg-set-support-languages): Removed.
+	(egg-mode): Don't call egg-set-conversion-backend.
+	* egg/{canna.el, wnn.el, sj3.el}: Don't call egg-support-languages.
+
+	* egg-cnv.el (egg-set-current-backend): Removed.
+	(egg-initialize-backend, egg-start-conversion,
+	egg-start-reverse-conversion): Don't call egg-set-current-backend.
+	(egg-conversion-backend-null): Rename from *-other-languages.
+	(egg-conversion-backend-alist): Removed.
+	(egg-conversion-backend): Not buffer local.
+	(egg-finalize-backend-alist): Removed.
+
+1998-07-10  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* egg-cnv.el (egg-start-conversion-failure-hook): New Variable.
+	(egg-start-conversion-failure-fallback): New Function.
+	(egg-convert-region): Handle error and hook on failure.
+
+	* egg/sj3.el (sj3-open): Remove bogus setq-s of sj3-sys-dict-list,
+	sj3-user-dict-list.
+
+	* egg-mlh.el (mlh-space-bar-backward-henkan): Don't emit message
+	"converting...", as it may flush out error message.
+
+	* egg/sj3rpc.el ("egg-com", "egg/sj3"): Require on compilation.
+	(sj3rpc-open): Failure when version is different.
+
+1998-07-03  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* its/erpin.el, its/hangul.el, its/hankata.el, its/hira.el,
+	its/jeonkak.el, its/kata.el, its/pinyin.el, its/quanjiao.el,
+	its/thai.el, its/zenkaku.el: Updated using new its-*.
+
+	* its.el (define-its-state-machine): Rewritten.
+	(define-its-compiled-map): Deleted.
+	(define-its-state-machine-append): Rewritten.
+	(its-defrule): Rewritten.
+	(its-defrule*): Rewritten.
+	(its-parent-states): New Variable.
+	(its-goto-state): Remove 2nd optional argument INITIAL-STATE.
+	(its-set-interim-terminal-state): New Function.
+	(its-make-next-state): Remove 2nd argument KEYSEQ.
+
+1998-07-01  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* egg-mlh.el (mlh-hira-to-kata): Removed.  Doesn't work any more.
+	(mlh-katakana): Use japanese-katakana-region.
+
+	* egg-cnv.el (egg-conversion-map): Add again mapping for "/".
+
+1998-06-27  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* egg-cnv.el (egg-abort-conversion): Bug fix.
+
+1998-06-27  NIIBE Yutaka  <gniibe@akebono>
+
+	* egg/wnn.el (wnn-dictionary-specification-list): Don' specify
+	for gerodic/g-jinmei.
+	Suggested by SAKAI Kiyotaka <ksakai@netwk.ntt-at.co.jp>.
+
+1998-06-26  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* its.el (its-cancel-input): Bug fix.
+
+1998-06-26  SAKAI Kiyotaka <ksakai@netwk.ntt-at.co.jp>
+
+	* egg-cnv.el (egg-conversion-mode, egg-help-command): New
+	functions for help string.
+	* its.el (its-mode, its-mode-help-command): Likewise.
+
+1998-06-26  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* egg-cnv.el (egg-convert-region): Bug fix.
+	* egg.el (egg-default-language): Don't use string.
+
+	* its/hankata.el (its-han-kata-enable-double-n, and others):
+	Variable name change (-han-) to distingush kata.el.
+
+	* its/erpin.el (its-erpin-tw-enable-quanjioao-alphabet,
+	its-erpin-cn-enable-quanjioao-alphabet): 
+	See its-enable-fullwidth-alphabet.
+	* its/kata.el (its-kata-enable-zenkaku-alphabet): Likewise.
+	* its/pinyin.el (its-pinyin-cn-enable-quanjioao-alphabet): Likewise.
+	* its/zenkaku.el (its-zenkaku-down-map): Likewise.
+
+	* its/erpin.el (its-erpin-tw-map): Bug fix for "\\", "{", "}", and
+	"/".
+	* its/pinyin.el (its-pinyin-cn-map): Ditto.
+	* its/quanjiao.el (its-quanjiao-down-tw-map): Ditto.
+	* its/zhuyin.el (its-zhuyin-cn-enable-quanjioao-alphabet): Ditto.
+
+	* its/hira.el (its-hira-enable-zenkaku-alphabet): Follow changes
+	of its.el.
+	* its/ascii.el (its-up-map, its-down-map): Ditto.
+	* its/jeonkak.el (its-jeonkak-up-map): Ditto.
+
+	* its/hira.el (its-hira-enable-zenkaku-alphabet): 
+	See its-enable-fullwidth-alphabet.
+
+	* egg/wnn.el (wnn-save-dictionaries): Rewritten.
+
+	* egg/canna.el (egg-edep): Required.
+	(canna-support-languages): Use symbol.
+	* egg/sj3.el (egg-edep): Likewise.
+
+	* egg/wnn.el (egg-edep): Likewise.	
+	* egg/wnnrpc.el: Use symbol.
+
+	* menudiag.el (menudiag-mode-map): Bug fix for boundary conditions.
+	(menudiag-make-selection-list): Bug fix in case of many items.
+
+	(menudiag-forward-item, menudiag-backward-item,
+	menudiag-goto-line): Change so that it wraps.
+
+	* its.el (egg-edep): Required.
+	(its-keydef): Require unconditioanlly.
+	(its-mode-map): Don't call its-define-select-keys here.
+	(its-mode-map): Use of symbol as keymap.
+	(its-fence-invisible): New variable.
+	(its-put-cursor): Don't call its-define-select-keys.
+	(its-setup-fence-mode): invisible handling and its-define-select-keys.
+	(its-keyseq-acceptable-p): if (CDR SYL) is number, return NIL.
+	(define-its-state-machine): Introduce its-temporaly-map.
+	(define-its-state-machine-append): Likewise.
+
+	(its-goto-state): Use symbol as keymap, not directly.
+
+	(its-set-part-1,its-set-part-2): New function.
+	(its-delete-backward-within-SYL): Conditionalize.
+
+	* egg.el (egg-edep): Required.
+	(egg-mode): Add remove-hook call.
+	Supply NIL as first argument to egg-set-conversion-backend.
+	make-local-hook for input-method-activate-hook.
+	(egg-set-face): Add optional argument OBJECT.
+	(egg-redraw-face): Bind inhibit-point-motion-hooks.
+
+	* egg.el (set-buffer-multibyte): Move to egg-edep.el.
+
+	* egg-mlh.el (mlh-space-bar-backward-henkan): Use assq.
+
+	* egg-com.el (egg-zhuyin-syllable): compatibility change.
+	(encode-fixed-euc-china-region): Removed maxlen.
+
+	Really Needed? -- gN.
+	* egg-com.el (egg-pinyin-syllable): Check exact match.
+	(egg-zhuyin-syllable): Likewise.
+
+	* egg-cnv.el (egg-edep): Required.
+	(its-keydef): Not required.
+	(egg-conversion-map): Don't call its-define-select-keys here.
+	Fset it to use symbol instead of the map directly.
+
+	(egg-get-bunsetsu-info): Add new optional argument for getting
+	property.
+	(egg-start-conversion-other-languages): set egg-conversion-backend.
+	(egg-set-current-backend): Use assq instead of assoc.
+	(egg-get-conversion-face): Likewise.
+	(egg-conversion-invisible): New variable.
+	(egg-convert-region): Change for open/close delimiter.
+	(egg-chinese-sisheng-regexp): New function.
+	(egg-separate-languages): Use egg-chinese-sisheng-regexp,
+	use symbol for language specifier (instead of string).
+
+	(egg-charset-to-language): Use symbol for language specifier
+	(instead of string).
+	(egg-next-chinese-lang): Likewise.
+
+	(egg-next-part-lang): Change the arguments.
+
+	(egg-make-bunsetsu): New function changing egg-insert-bunsetsu.
+
+	(egg-separate-characters): compatibility changes.
+
+	(egg-conversion-wrap-select): New Variable.
+
+	(egg-next-candidate): Can wrap around.
+
+	(egg-decide-before-point): Rewritten.
+	(egg-abort-conversion): Back to previous one.
+	(egg-select-candidate): Use egg-make-bunsetsu.
+
+	* egg-edep.el: New File for handling differences between Emacs version.
+	* its/thai.el: New File.
+	* its/hangul.el: Updated.
+
+1998-06-26  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* Makefile (install): Don't touch .emacs and leim-list.el
+	directly.  User should do it by her hand.
+	Reported by SAKAI Kiyotaka <ksakai@netwk.ntt-at.co.jp>
+
+1998-06-25  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* egg/canna.el (canna-dictionary-specification): "user" instead of
+	("user").  Should chnage canna-filename later.
+	Reported by Akio Morita <amorita@bird.scphys.kyoto-u.ac.jp>.
+
+1998-04-02  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* egg-com.el (comm-unpack-u16-string): Call string-as-multibyte.
+	(comm-unpack-mb-string): Likewise.
+
+	* egg.el (set-buffer-multibyte): Function for Emacs 20.2.
+
+	* egg/wnn.el (wnn-open): Call set-buffer-multibyte.
+	* egg/sj3.el (sj3-open): Ditto.
+	* egg/canna.el (canna-open): Ditto.
+
+1998-04-02  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	Implement hilight.
+	* egg.el (egg-mark-list, egg-suppress-marking): New Variables.
+	(egg-set-face, egg-mark-modification, egg-redraw-face): New
+	Functions.
+	* its.el (its-buffer-ins/del-SYL): Call egg-set-face.
+	(its-setup-yanked-portion): Likewise.
+	* egg-cnv.el (egg-insert-bunsetsu): Call egg-set-face.
+
+	* egg.el (egg-mode): set default backend.
+	* egg-mlh.el (mlh-space-bar-backward-henkan): activate input
+	method.
+
+1998-04-02  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* egg-cnv.el (egg-decide-bunsetsu): Undo changes of 03-16.
+	(egg-abort-conversion): Call egg-end-conversion.
+	(egg-decide-before-point): Call egg-end-conversion widh ABORT=NIL.
+
+1998-03-16  NIIBE Yutaka  <gniibe@chroot.org>
+
+	CANNA Support.
+	* egg/canna.el, egg/cannarpc.el: New file.
+	* Makefile (SRCS): Added.
+
+	* egg-cnv.el (egg-end-conversion): Add argument ABORT.
+
+	* egg/wnn.el (wnn-end-conversion): Follow the change of 
+	EGG-END-CONVERSION.
+	* egg/sj3.el (sj3-end-conversion): Likewise.
+
+1998-03-15  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* Makefile: Add dependencies for its-keydef.elc.
+	* egg/sj3rpc.el (sj3-open): Don't support list of hosts.
+	* its.el (its-exit-mode, its-kick-convert-region): Bug fix.  Call
+	its-input-end and its-put-cursor.
+	(its-exit-mode-off-input-method): Removed. 
+
+1998-03-14  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* docomp.el (its-keydef): Undo the changes of 03-09.  its.el
+	is fixed.
+
+	* egg-cnv.el (egg-current-language): New valiable.
+	(egg-bunsetsu-info): Separate bunsetsu-info and lunguage.
+	(egg-conversion-backend-other-languages
+	egg-init-other-languages
+	egg-start-conversion-other-languages
+	egg-get-bunsetsu-converted-other-languages
+	egg-get-bunsetsu-source-other-languages
+	egg-list-candidates-other-languages
+	egg-get-number-of-candidates-other-languages
+	egg-get-current-candidate-number-other-languages
+	egg-get-all-candidates-other-languages
+	egg-decide-candidate-other-languages
+	egg-change-bunsetsu-length-other-languages
+	egg-end-conversion-other-languages
+	egg-fini-other-languages): New valiable and functions for
+	handling unknown language.
+	(egg-set-current-backend): Set egg-conversion-backend-other-languages
+	when backend for specified language isn't found.
+	(egg-start-reverse-conversion): New function for reverse conversion.
+	(egg-set-conversion-backend-internal): Removed.
+	(egg-set-conversion-backend): Args are changed.
+	(egg-get-conversion-face): New function for different face for
+	every language.
+	(egg-convert-region): Make converting text read-only. Handle
+	unknown laguages and backend opening error. Rename its-lang to
+	egg-lang.
+	(egg-separate-languages): Argument use-context is added to
+	utilize context when called by its-yank. Rename its-lang to
+	egg-lang Improve speed.
+	(egg-charset-to-language): Renamed from egg-char-to-language.
+	(egg-next-part-lang egg-next-chinese-lang): Rename its-lang to
+	egg-lang.
+	(egg-conversion-map): Unbind C-\ and /. Bind C-X RET XXX to
+	its-select-XXX.
+	(egg-insert-bunsetsu): Make conversion text read-only. Separate
+	bunsetsu-info and conversion-backend. 
+	(egg-insert-bunsetsu-list): Remove redundant variables.
+	(egg-beginning-of-conversion-buffer): New function.
+	(egg-end-of-conversion-buffer): New function.
+	(egg-enlarge-bunsetsu): Handle read-only text.
+	(egg-next-candidate): Handle read-only text. Bug on no candidate
+	bunsetsu is fiexed.
+	(egg-reconvert-bunsetsu-internal egg-reverse-convert-bunsetu
+	egg-reconvert-bunsetsu): New functions for reverse conversion and
+	re-conversion.
+	(egg-decide-before-point egg-abort-conversion): Handle read-only
+	text. Bug on pinyin and zhuyin mixed conversion is fixed. Allow
+	long fence.
+	(egg-select-candidate): Handle read-only text. Bug on no candidate
+	bunsetsu is fiexed.
+
+	* egg-com.el: Change coding-system from internal to iso-2022-7bit.
+
+	* egg-mlh.el (mlh-space-bar-backward-henkan): Disable temporally
+	mode selection.
+
+	* egg.el (egg-mode): Set cureent lang to conversion backend.
+	(egg-set-mode-line-title): Renamed to its-set-mode-line-title
+	and moved to its.el.
+	(egg-check-language): Removed.
+
+	* egg/sj3.el (sj3-server-port): Change from defconst to defver for
+	user customization.
+	(sj3-open sj3-get-environment): Try opening alternate servers.
+	(sj3-start-conversion): Make second argument LANGUAGE optional.
+	(egg-activate-sj3): Parameters of egg-set-conversion-backend is
+	changed.
+
+	* egg/sj3rpc.el (sj3rpc-error-message): New constant (Not yet
+	completed).
+	(sj3rpc-get-error-message): Check range of errno to avoid
+	args-out-ou-range error.
+
+	* egg/wnn.el (wnn-jport wnn-cport wnn-tport wnn-kport): New
+	variables for user customization.
+	(wnn-server-info-list wnn-server-port): Type of fourth element
+	is changed from integer to symbol.
+	(wnn-start-reverse-conversion): New function.
+	(wnn-open wnn-get-environment): Try opening alternate servers.
+	(egg-activate-wnn): Parameters of egg-set-conversion-backend is
+	changed.
+
+	* its-keydef.el (its-current-language): Moved to its.el.
+	(its-make-select-func): Remove language check (egg-check-language).
+	Add temporally mode selection.
+	(its-do-list-make-select-func): Binding of zhuyin-tw is changed to
+	`C' because conflicting zenkaku-upcase.
+
+	* its.el (its-current-select-func its-previous-select-func): New
+	variables for temporally mode selection.
+	(its-keydef requiring): Use eval-when to avoid error on using
+	compiled file.
+	(its-get-fence-face): New function for different face for
+	every language.
+	(its-put-cursor its-setup-fence-mode): Make fence read-only.
+	(its-start): Remove force-mode-line-update calling.
+	(its-restart): Add optional argument set-prop.
+	(its-self-insert-char its-backward-SYL its-forward-SYL
+	its-delete-SYL its-delete-backward-SYL its-exit-mode
+	its-delete-backward-SYL-by-keystroke its-transpose-chars
+	its-kick-convert-region its-end-of-input-buffer): Handle read-only
+	fence.
+	(its-state-machine): Accept special actions to handle temporally
+	mode selection.
+	(its-buffer-ins/del-SYL its-ins/del-SYL-batch): Handle read-only
+	fence. Property its-lang is renamed to egg-lang.
+	(its-get-next-state its-make-next-state): Add type check to avoid
+	wrong-type-argument error.
+	(its-keyseq-acceptable-p): Save informations of its-map to avoid
+	confusing on temporally mode selection.
+	(its-defrule-select-mode-temporally): New macro.
+	(its-kill-line its-cancel-input): New function.
+	(its-delete-backward-within-SYL): Bind its-current-language to
+	avoid confusing when undo is done beyond language change.
+	(its-yank its-yank-pop its-setup-yanked-portion): New functions.
+	(its-exit-mode-internal): Reset temporally selected mode. Allow
+	long fence.
+	(its-kick-convert-region-or-self-insert): New function.
+	(its-translate-region): Remove text properties completly.
+	(its-set-mode-line-title): Moved from egg.el and renamed.
+	(its-select-mode-temporally its-select-previous-mode): New functions
+	for temporally mode selection.
+
+	* leim-list-egg.el: Secondary argument for egg-activate-sj3/wnn
+	is no longer needed.
+
+	* its/hira.el: Remove the rule for "~" which destroies the rules
+	with its-hankaku-escape.
+
+	* its/pinyin.el: Implement its-pinyin-cn-enable-quanjioao-alphabet
+	and its-pinyin-tw-enable-quanjioao-alphabet.
+
+	* its/hangul.el: Implement its-hangul-enable-quanjioao-alphabet.
+
+	* its/ascii.el: New file.
+	* its/erpin.el: New file.
+	* its/hankata.el: New file.
+	* its/jeonkak.el: New file.
+	* its/kata.el: New file.
+	* its/quanjiao.el: New file.
+	* its/zenkaku.el: New file.
+	* its/zhuyin.el: New file.
+
+1998-03-14  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* egg/sj3rpc.el (sj3rpc-close): New function.
+
+	* egg/sj3.el (sj3bunsetsu-[sg]et-kugiri-changed): Rename from
+	sj3bunsetsu-get-stdy-down.
+	(sj3-end-conversion): Implement CLSTDY.
+	(sj3-fini): Implemented.
+
+1998-03-10  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* egg/sj3.el (sj3-end-conversion): Implement bunsetsu study.
+	CLSTDY not yet.
+
+	* egg/sj3rpc.el (sj3rpc-get-bunsetsu-candidates-sub): Bug fix.
+	Always add hiragana and katakana candidates.
+	(sj3-const: CLSTDY, CLSTDY_EUC): Renamed from END and END_EUC
+	according to "sj3cmd.h" of SJ3 distribution.
+	(sj3rpc-bunsetsu-stdy, sj3rpc-kugiri-stdy): New functions.
+
+	* egg-com.el (comm-format-u8-vector): New substitution.
+	(comm-format): New format 'v'.
+
+1998-03-09  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* docomp.el (its-keydef): Require its-keydef when compile.
+	Not so good.  Just a work around.
+	(its-mode-map): Undo the changes of 03-04.
+	
+1998-03-09  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* its.el (its-translate-region): Make it command.
+	(its-translate-region-internal): Make it function.
+
+1998-03-04  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its.el (its-define-select-keys of its-mode-map): Comment it out.
+	* its-keydef.el (its-make-select-func): Add eval-when to compile this.
+
+	* egg-cnv.el (egg-decide-bunsetsu): Deleted.
+	* its.el (its-restart): Call its-setup-fence-mode with no argument.
+
+	* its.el (its-keyseq-acceptable-p): Bug fix.
+
+1998-03-03  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	*its.el (its-get-keyseq-syl): Compensate when DSYL has back.
+	(its-DSYL-with-back-p): New function. Return t when DSYL has back.
+	(its-concrete-DSYL-p): New function. Return t when DSYL is cons
+	form which means input is not continued after DSYL was created.
+	(its-make-concrete-DSYL): New function.
+	(its-self-insert-char): Make DSYL to ``concrete-DSYL'' if cursor
+	is t which means input is not continued.
+	(its-input): Test input key is whether acceptable or not when
+	its-barf-on-invalid-keyseq is non-nil.
+	(its-input-to-vsyl): Set cursor status, not just returning it.
+	(its-state-machine its-state-machine-keyseq): Make sure to issue
+	``DSYL-with-back'' when syllable is decided by the rule with back.
+	``test mode'' is added.
+	(its-keyseq-acceptable-p): New function.
+	(its-forward-SYL): The args order of put-text-property was wrong.
+	(its-delete-backward-SYL-by-keystroke): New function.
+	(its-delete-backward-within-SYL): ``delete-by-keystroke'' mode
+	did not work when syllable is decided by the rule with back.
+	Deletion limit is extended to outside of SYL (meaning of
+	``within-SYL'' is changed to ``deletion starts within SYL).
+	(its-transpose-chars): Fixed up.
+	(its-in-fence-p): Confuse at openning fence.
+
+1998-02-25  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* its.el (its-put-cursor): Enable its-map change in fence mode.
+
+	* its-keydef.el (its-make-select-func): Same as above.
+
+1998-02-25  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* its.el (its-set-cursor-status): New function.
+	(its-setup-fence-mode): New function.
+	(its-insert-fence-open its-insert-fence-close): Deleted.
+	(its-start, its-restart, its-self-insert-char): Avoid fence
+	destruction on its-barf.
+	(its-input-to-vsyl, its-state-machine, its-state-machine-keyseq,
+	its-buffer-ins/del-SYL, its-ins/del-SYL-batch): Update cursor
+	status on updating syllables.
+	(its-input-error): New function to realize doc-string of
+	its-barf-on-invalid-keyseq.
+
+	* egg.el (egg-mode): Don't use egg-mode-line-title which cause
+	wrong-type-argument at isearch.  Bind its-select-XXX to key only
+	when modefull is select.
+
+	* egg-mlh.el (mlh-hangul, mlh-zhongwen, mlh-zhongwen-tw): Same
+	as above.
+
+	* its-keydef.el (its-make-select-func): Same as above.
+
+	* leim-list-egg.el: Same as above.
+
+1998-02-24  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* its.el (its-state-machine-keyseq): Remove binding
+	its-barf-on-invalid-keyseq to nil.
+	(its-ins/del-SYL-batch): Avoide altering its-XXX-map.
+	(its-translate-region-internal): its-translation-result's data
+	type is changed to string.
+
+	* egg-cnv.el (egg-convert-region): Gather contiguous same
+	language part.
+
+1998-02-21  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* its.el (its-ins/del-SYL-batch): Set its-lang property.
+	(its-translate-region): Remove its-lang property from translated
+	text.
+	(its-translate-region-internal): New function.  Retain its-lang
+	property on translated text.
+
+	* egg-mlh.el (mlh-space-bar-backward-henkan): Force base language
+	to Japanese.
+
+	(mlh-hangul mlh-zhongwen-tw mlh-zhongwen): New functions for
+	conversion functions.
+
+1998-02-20  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* its.el (its-restart): New function.
+	(its-insert-fence-open, its-insert-fence-close): New function.
+	(its-start): Rewritten.  Use its-insert-fence-open and
+	its-insert-fence-close.
+	(its-exit-mode-internal): Leave its-syl property.
+	(its-exit-mode-internal): Delete the property in this case.
+	(its-keydef): Require it.
+
+	* its-keydef.el: Provide the feature.
+
+	* egg-cnv.el (egg-convert-region): Add egg-source property to save 
+	the source string.
+	(egg-conversion-map, \C-c): New keybind.
+	(egg-get-previous-bunsetsu): Bug fix.
+	(egg-decide-before-point): New implementation.
+	(egg-exit-conversion): Use gg-decide-before-point.
+	(egg-abort-conversion): New command.
+
+1998-02-20  NIIBE Yutaka  <gniibe@akebono>
+
+	* Makefile (SRCS), Egg.prj: Remove euc-china.el.
+	* egg-com.el: Include egg-china.el.
+	* egg-china.el: Removed.
+
+1998-02-18  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* Egg.prj: Use PRCS.
+
+	* Makefile (SRCS): Rename euc-cn.el to euc-china.el
+	* egg-mlh.el (mlh-space-bar-backward-henkan): Put "Japanese"
+	language property for text.
+
+1998-02-18  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* euc-china.el: Rename from euc-cn.el.  Update.
+
+	* egg.el (egg-mode): Bug fix.  Call get-exit-conversion.
+	* leim-list-egg.el ("japanese-egg-wnn", "japanese-egg-sj3"): 
+	Use new definition (with language argument).
+	* egg/wnn.el (egg-activate-wnn): 
+	* egg/sj3.el (egg-activate-sj3): 
+	
+1998-02-17  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* Makefile (SRCS): Add its/pinyin.el, its/hangul.el and
+	its-keydef.el.
+
+	* egg-com.el (ccl-encode-fixed-euc-kr): Fixed the name.
+	
+1998-02-17  KATAYAMA Yoshio <kate@pfu.co.jp>
+	
+	* its-keydef.el: New file.
+	* its/hangul.el, its/pinyin.el: New version.
+
+	* egg/wnnrpc.el (load-library "egg/wnn"): Comment it out.
+	(wnnrpc-get-error-message): Support multiple languages.
+	(wnnrpc-call-with-environment): Chinese support.
+
+	* egg/wnn.el (wnn-support-languages): New const.
+	(<env>): Add <server-type>, <dic-set>, and <rev-flag>.
+	(wnnenv-get-server-type, wnnenv-get-dictionary-set,
+	 wnnenv-get-reverse-flag): New substs.
+	(wnnenv-get-daibunsetsu-info, wnnenv-set-daibunsetsu-info): Changed.
+	(wnn-server): Removed.
+	(wnn-jserver, wnn-cserver, wnn-tserver, wnn-kserver): New custom.
+	(wnn-server-info-list): New const.
+	(wnn-get-server-info): New function.
+	(wnn-server-locale, wnn-server-type, wnn-server-port,
+	 wnn-server-stream-name, wnn-server-buffer-name,
+	 wnn-server-coding-system, wnn-server-hostname): New substs.
+	(wnn-start-conversion): Add new arguments.
+	(wnn-uniq-candidates): Initialize 'n'.
+	(wnn-change-bunsetsu-length): Simplefied.
+	(wnn-change-bunsetsu-length): Call renbunsetsu-conversion,
+	instead.
+	(wnn-fini, wnn-comm-sentinel): back to 971009 version.
+	(wnn-jserver-port): Removed.
+	(wnn-open): Argument change.  Support languages.
+
+	(wnn-dictionary-specification): Removed.
+	(wnn-dictionary-specification-list): New variable.
+	(wnn-get-dic-spec, wnn-dic-spec-dic-set, wnn-dic-spec-reverse,
+	wnn-dic-spec-name, wnn-dic-spec-param, wnn-dic-spec-fuzokugo,
+	 wnn-dic-spec-dic-list): New substs.
+	(wnn-get-environment): Rewrite.
+	(wnn-create-environment): Rewrite.
+
+	(egg-activate-wnn): Support languages.
+
+	* egg/sj3rpc.el (load-library "egg/sj3"): Don't load it.
+
+	* egg/sj3.el (sj3-support-languages): New const.
+	(sj3-start-conversion, sj3-fini): Add lang.
+	(sj3-change-bunsetsu-length): Simplified.
+	(egg-activate-sj3): Support language.
+
+	* its/hira.el (its/hira): Packagefy. (?)
+	(its-hira-map): Add language spec.  Move here the escape keys
+	("Z", "~").
+
+	* leim-list-egg.el ("chinese-gb-egg-wnn-py", "chinese-gb-egg-wnn-zy",
+	 "chinese-cns-egg-wnn-py", "chinese-cns-egg-wnn-zy",
+	 "korean-egg-wnn"): New input methods.
+
+	* its.el (its-current-language): New Local Variables.
+	<map>: Change the structure.  Add <language>.
+	(its-get-language): New substitution.
+	(its-set-indicator): Removed.
+	(its-get-indicator, its-get-start-state): New implementation.
+	(its-reset-start-state): Removed.
+	(its-buffer-ins/del-SYL): Add new properties, its-map and its-lang.
+	(its-exit-mode-internal): Change for its-map and its-lang.
+	(its-in-fence-p): New function.
+
+	("its-keydef.el"): Load it.
+
+	(its-select-map-menu): Removed.
+	(its-select-map-from-menu): Removed.
+	(its-select-hiragana, its-select-katakana, its-select-downcase,
+	its-select-upcase, its-select-zenkaku-downcase,
+	its-select-zenkaku-upcase, its-select-map, its-zenkaku-escape,
+	its-hankaku-escape): Removed.
+
+	(define-its-state-machine): Rewrite.
+	(define-its-compiled-map): New macro.
+	(its-define-state-machine): Removed.
+
+	(its-forward-SYL): Cleanup.
+
+	(its-beginning-of-input-buffer): Fix.
+	(its-end-of-input-buffer): Likewise.
+
+	* egg-com.el (egg-fixed-euc, egg-mb-euc): New Local Variables.
+	(ccl-decode-fixed-euc-kr, ccl-encode-fixed-euc-kr): New CCLs.
+	(fixed-euc-kr): New coding system.
+	(comm-format-mb-string, comm-format-u16-string): Support EUC-KR.
+	(comm-unpack-u16-string, comm-unpack-mb-string): Likewise.
+
+	* egg-cnv.el (egg-get-bunsetsu-info): New function.
+	(egg-conversion-backend-alist, egg-finalize-backend-alist): 
+	New Variables.
+	Make egg-conversion-backend buffer local.
+	(egg-set-current-backend): New function.
+	(egg-initialize-backend): Call egg-set-current-backend.
+	(egg-start-conversion): Add new argument LANGUAGE.
+	(egg-finalize-backend): Finalize for all backend(s).
+	(egg-set-conversion-backend-internal): New Macro.
+	(egg-convert-region): Support multiple languages in the region.
+	(egg-separate-languages, egg-char-to-language, egg-next-part-lang,
+	egg-next-chinese-lang): New functions.
+	(egg-insert-bunsetsu-list): Change the meaning of last argument.
+	(egg-shrink-bunsetsu): Simplified.  Just call egg-enlarge-bunsetsu.
+	(egg-enlarge-bunsetsu): Support shrink.
+
+	(egg-decide-bunsetsu, egg-next-candidate, egg-select-candidate): 
+	Use egg-get-bunsetsu-info.
+
+	(egg-insert-bunsetsu): The property now includes
+	egg-conversion-backend.
+
+	* egg.el: Don't load its/hira and don't set its-current-map.
+
+	* egg.el (egg-default-language, egg-support-languages): New Variables.
+	(egg-last-method-name, egg-mode-line-title): New Local Variables.
+	(egg-set-mode-line-title, egg-check-language): New functions.
+	(egg-set-support-languages): New function.
+	(egg-mode): Final processing: call its-exit-mode, call
+	egg-exit-conversion.
+	Changing the arguments, remember last input method.
+
+	Bug fix. Don't set its-hira-period and its-hira-comma.
+
+1998-02-17  KAWABATA, Taichi
+
+	* menudiag.el (menudiag-mode-map): New binds for new commands.
+	(menudiag-beginning-of-items, menudiag-end-of-items): New commands.
+	(menudiag-make-menu-formatted-string): Bug fix.  Use 
+	menudiag-item-num-to-char.
+	(menudiag-goto-item): Rewrite.  Better user interface.
+	(menudiag-char-to-item-num, menudiag-item-num-to-char): New
+	functions.
+
+1998-02-07  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+	* leim-list-egg.el: Delete autoload setting for `egg-mode'.
+	Delete input method registration for "japanese-egg".
+
+	* egg.el: Comment out setting for Wnn.
+
+	* leim-list-egg.el: Add autoload setting for
+	`egg-activate-{wnn|sj3}'.
+
+	* egg/sj3.el (egg-activate-sj3): Add DOC-string.
+
+	* egg/sj3.el (egg-activate-sj3): New function.
+	Require egg.
+	Load egg/sj3rpc.el.
+
+	* egg/wnn.el (egg-activate-wnn): New function.
+	Require egg.
+	Load egg/wnnrpc.el.
+
+1998-02-07  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+	* leim-list-egg.el (japanese-egg-wnn): New input method.
+	(japanese-egg-sj3): New input method.
+
+1997-11-20  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+	* leim-list-egg.el: Rename `egg-ja' -> `japanese-egg'.
+
+1997-11-20  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+	* egg/wnn.el (wnn): New group.
+	(wnn-server): Use `defcustom'.
+	(wnn-usr-dic-dir): Use `defcustom'.
+
+	* egg.el (egg): New group.
+
+1997-11-20  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+	* menudiag.el (menudiag-mode-map): Swap binding for left and
+	right.
+
+	* egg.el (egg-toroku-region): `wnn-get-environment' requires
+	dictionary-specification.
+
+	* leim-list-egg.el: add autoload setting for egg-mode.
+
+1997-11-03  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* euc-cn.el: New file.  Original name was yincoding.el.
+	Adopted by NIIBE Yutaka  <gniibe@chroot.org>.
+	
+1997-11-03  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its.el (its-start): Add INVISIBLE property if ITS-FENCE-FACE.
+	* egg-cnv.el (egg-decide-before-point): Ditto.
+	Based on patch by Kenichi HANDA <handa@etl.go.jp>.
+
+	Once, I thought that we need many environments which correspond to
+	outstanding CONVERSION buffre.  However, I've learned that WNN4
+	protocol is completely independent.  It's no use to maintain each
+	environment.  Share the one environment.
+	* egg/wnn.el (wnn-environments): Removed.  
+	(wnn-environment): New variable.
+	(wnn-comm-sentinel): Follow the change.  Let users know the close.
+	(wnn-fini): Likewise.
+
+	<env>: Remove the member <in-use>.
+	(wnnenv-create): Follow the structure change.
+	(wnn-end-conversion): Likewise.
+	(wnnenv-get-in-use-flag, wnnenv-set-in-use-flag): Removed.
+	(wnn-find-env-not-in-use): Removed.
+	(wnn-get-environment): Use wnn-environment instead of wnn-environments.
+	Take one argument.
+
+	* egg-cnv.el (egg-decide-before-point): Signal error on first SYL.
+	Reported by KATAYAMA Yoshio <kate@pfu.co.jp>.  Changes of 1997-09-07
+	was not enough.
+	Set-marker M to NIL after PUT-TEXT-PROPERTY.
+
+	Because the name of identifier begins egg-*, change the file names.
+	* tamago: Rename from tamago.
+	* egg.el, egg-mlh.el, egg-com.el, egg-cnv.el: Rename from tamago-*.el
+	* Makefile: Follow the changes.
+
+1997-10-05  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* tamago/wnn.el (wnn-uniq-candidates): Add new argument BUNSETSU.
+	Call WNN-BUNSETSU-SET-ZENKOUHO-POS, WNN-BUNSETSU-SET-ZENKOUHO in
+	this function.  Handle the case where BUNSETSU is not the first
+	element of BUNSETSU-LIST.
+	(wnn-list-candidates): Use new API of WNN-UNIQ-CANDIDATES.
+
+	* tamago-cnv.el (egg-next-candidate): Handle the case where
+	EGG-LIST-CANDIDATES returns non zero value.
+
+1997-10-04  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* Makefile (install): Install to SITEDIR.
+
+1997-09-26  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its/hira.el (its-hira-enable-zenkaku-alphabet): New variable.
+	(its-hira-map): Use it.
+
+1997-09-19  NIIBE Yutaka  <gniibe@chroot.org>
+
+	Arrange for LEIM.  Use tamago/ subdirectory.
+	* tamago/: Rename from tamago-lib.
+
+1997-09-18  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* tamago-cnv.el (egg-select-candidate): menu-select -->
+	menudiag-select. 
+	* tamago.el (egg-toroku-region,	egg-hinshi-select): Likewise.
+
+	* tamago-cnv.el (egg-exit-conversion): Run hook of
+	input-method-after-insert-chunk-hook.
+	* its.el (its-exit-mode-internal): Ditto.
+
+	* tamago-mlh.el (mlh-comma-period-style): Deleted.
+
+	* its/, tamago-lib/: New directory.
+	* its/: Move its-*.el files here.
+	* tamago-lib/: Move sj3.el, sj3rpc.el, wnn.el and wnnrpc.el here.
+
+	* tamago-com.el: Rename from comm.el.
+	* tamago-mlh.el: Rename from mlh.el.
+	* tamago-cnv.el: Rename from convert.el.
+
+	* menudiag.el: Rename from menu.el.
+	(Throughout): Rename menu-* to menudiag-*.
+
+1997-09-07  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* egg.el (egg-insert-after-hook, egg-exit-hook): Removed.
+	(egg-sai-henkan-start, egg-sai-henkan-end, egg-old-bunsetu-suu):
+	Removed.
+
+	* wnn.el (WNN-const): New macro.
+	(wnn-start-conversion, wnn-open-dictionary, wnn-open-frequency,
+	wnn-set-dictionary-sub, wnn-update-frequency): Use it.
+
+	* wnnrpc.el (wnn-const): New macro.
+	Throughout: Use wnn-const.
+
+	* convert.el (egg-decide-before-point): Bug fix.  Handle the case
+	where all bunsetsu are decided.
+	Reported by KATAYAMA Yoshio <kate@pfu.co.jp>.
+
+	* convert.el (egg-exit-conversion): Call egg-end-conversion at end.
+	(egg-decide-before-point): Ditto.
+
+	* wnn.el (wnn-environments): Change the structure of enviromnents.
+	(wnn-fini): Handle errors.
+	(wnn-open): Set sentinel.  Delete buffer on failure.
+	(wnn-comm-sentinel): New function.
+	(wnn-find-env-not-in-use): Return nil when not found.
+
+	(wnn-create-environment): Take username as argument.
+	(wnn-get-environment): Follow the change.
+
+	(wnnenv-create): Remove useless serial no.
+	(wnnenv-get-in-use-flag, wnnenv-set-in-use-flag): Follow the change.
+	(wnnenv-get-daibunsetsu-info, wnnenv-set-daibunsetsu-info): Likewise.
+	(wnn-create-environment, wnn-get-environment): Likewise.
+
+1997-09-04  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its.el (its-state-machine-keyseq): Bug fix.  Handle VSYL.
+
+	* sj3.el, sj3rpc.el: New files.
+
+	* comm.el (comm-call-with-proc, comm-call-with-proc-1): New macros.
+	* wnnrpc.el (wnnrpc-call-with-proc, wnnrpc-call-with-proc-1): Deleted.
+	Throughout: Use comm-call-with-proc and comm-call-with-proc-1.
+
+1997-09-03  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* wnnrpc.el (wnnrpc-call-with-proc-1): Bug fix.  let --> progn.
+
+	* convert.el (egg-conversion-backend): Initail value is NIL.
+
+	* wnn.el (wnn-conversion-backend): New constant.
+
+	* comm.el (comm-format,comm-unpack): Support multibyte string.
+	(comm-format-mb-string): New substitution.
+	(comm-unpack-mb-string): New substitution.
+
+	* wnn.el (wnn-fini): Handle the case where wnn-environments is nil.
+	Reported by Hisashi Miyashita <himi@bird.scphys.kyoto-u.ac.jp>.
+
+1997-09-03  Hiroshi Ogata <hiroshi@nereid.rim.or.jp>
+
+	* mlh.el (mlh-zenkaku): Use new API of Emacs-20,
+	japanese-zenkaku-region.
+
+1997-09-02  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* egg.el (egg-toroku-region): New function.
+
+	* wnn.el (wnn-list-dictionaries): New function.
+	(wnnenv-get-proc): New function.
+
+	* wnnrpc.el (wnndic-get-id, wnndic-get-comment, wnndic-get-dictname): 
+	New substitution.
+	(wnnrpc-get-writable-dictionary-id-list): Rename from
+	wnnrpc-get-writable-dictionary-list.
+
+1997-09-01  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* convert.el (egg-decide-bunsetsu): New function.
+	(egg-decide-before-point): New command.
+	(egg-exit-conversion): Use egg-decide-bunsetsu.
+
+	* its.el (its-start): Divide the fence buffer into two parts and
+	make them intangible, so that point goes appropriate position.
+	(its-put-cursor): The cursor belongs to part-2.
+	(its-buffer-ins/del-SYL): The new SYL belongs to part-1.
+	(its-exit-mode-internal): Remove the property on exit.
+	(its-beginning-of-input-buffer): Make SYLs have property of "part 2".
+	(its-backward-SYL): Likewise.
+	(its-forward-SYL): Make SYLs have property of "part 1".
+	(its-end-of-input-buffer): Likewise.
+
+	(its-input-end): Delete useless argument.
+	(its-beginning-of-input-buffer, its-exit-mode,
+	its-exit-mode-off-input-method, its-kick-convert-region,
+	its-end-of-input-buffer, its-backward-SYL, its-forward-SYL,
+	its-delete-SYL): Follow the change.
+
+1997-08-31  NIIBE Yutaka  <gniibe@chroot.org>
+
+	For egg-mode, don't use minor mode, override local map instead.
+	For its-mode and egg-conversion-mode, don't use minor mode,
+	instead use local-map of text property.
+
+	Although overriding local map is not good, using local-map of
+	property is natural thing.  Besides, point-left/point-entered
+	don't work as I expected (yet).
+
+	* egg.el (egg-mode: variable): Removed.
+	* egg.el (egg-modefull-map, egg-modeless-map): Make them functions.
+	Generate overriding local map.
+	* egg.el (egg-mode): use overriding local map.
+
+	* its.el, convert.el: Undo changes of 1997-08-28 for minor mode
+	and local map of text properties.
+
+	* its.el (its-exit-mode-off-input-method): New function.
+
+1997-08-29  NIIBE Yutaka  <gniibe@chroot.org>
+
+	Let Undo work correctly.
+	* its.el (its-self-insert-char): Delete/Insert cursor.
+
+	* its.el (its-put-cursor): Remove useless first argument.
+	(its-start, its-beginning-of-input-buffer, its-end-of-input-buffer,
+	its-backward-SYL, its-forward-SYL, its-delete-SYL, its-delete-SYL,
+	its-delete-backward-SYL-internal, its-delete-backward-within-SYL): 
+	Follow the change.
+
+1997-08-28  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* its-erpin.el: New file.
+	* its-pinyin.el: New file.
+	* its-zhuyin.el: New file.
+
+1997-08-28  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its.el (its-exit-mode-no-egg): Removed.
+	(its-exit-mode-internal): Remove first argument.
+	(its-kick-convert-region, its-delete-SYL,
+	its-delete-backward-SYL-internal, its-delete-backward-within-SYL):
+	Follow the change.
+
+	Don't use local map of text properties, instead use minor mode.
+	* convert.el (egg-conversion-mode): New minor mode.
+	(egg-conversion-left, egg-conversion-enter): New functions.
+	(egg-insert-bunsetsu): remove local-map, add point-entered and
+	point-left properties.
+	(egg-exit-conversion): Likewise.
+	(egg-exit-conversion): Exit minor mode.
+
+	* its.el (its-put-cursor): remove local-map, add point-entered and
+	point-left properties.
+	(its-enter, its-left): New functions.
+	(its-mode): New variable.  New minor mode.
+
+1997-08-27  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* convert.el (egg-exit-conversion-no-egg): Removed.
+	(egg-exit-conversion): No argument, no egg-mode.
+
+	* convert.el (egg-convert-region): No egg-flag.
+	* its.el (its-exit-mode-internal): Follow it.
+	* mlh.el (mlh-space-bar-backward-henkan): Ditto.
+
+1997-08-26  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* wnn.el (wnn-change-bunsetsu-length): Don't use magic #3.
+
+	* convert.el (egg-insert-bunsetsu-list): Add optional argument
+	CONTIN.
+
+1997-08-25  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* convert.el (egg-insert-bunsetsu): Include seperator.  Add
+	intangible property to bunsetsu.
+	(egg-insert-bunsetsu-list): Follow the change.
+	(egg-backward-bunsetsu, egg-forward-bunsetsu, 
+	egg-select-candidate, egg-next-candidate, 
+	egg-shrink-bunsetsu, egg-enlarge-bunsetsu, 
+	egg-exit-conversion): Ditto.
+
+	* mlh.el (mlh-space-bar-backward-henkan): Call egg-convert-region
+	with last argument t.  Turn of egg-mode.
+
+1997-08-24  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its.el (its-exit-mode-internal): Inactivate input method.
+
+	* wnn.el (wnn-end-conversion): Change the interface.
+	(wnn-update-frequency): Follow the change.
+	* convert.el (egg-exit-conversion): Follow the change.
+
+	* wnn.el (wnn-start-conversion): Change the return value interface.
+	* convert.el (egg-convert-region): Follow the change.
+
+	* wnn.el (wnnenv-get-bunsetsu-pos, wnnenv-set-bunsetsu-pos): Removed.
+	(wnn-get-bunsetsu-source-afterwards): Removed.
+	(wnn-get-number-of-bunsetsu, wnn-get-bunsetsu-info): Removed.
+	(wnnenv-get-bunsetsu-list, wnnenv-set-bunsetsu-list): Removed.
+	(wnn-start-conversion): Don't call wnnenv-set-bunsetsu-list.
+	(wnn-end-conversion): Ditto.
+
+1997-08-23  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* convert.el (egg-change-bunsetsu-length): Change the interface.
+	(egg-shrink-bunsetsu,egg-enlarge-bunsetsu): Follow it.
+
+	(egg-source-maxlen-from-here): Removed.
+	(egg-get-previous-bunsetsu): New function.
+	(egg-select-candidate, egg-shrink-bunsetsu, egg-enlarge-bunsetsu,
+	egg-next-candidate): Use egg-get-previous-bunsetsu.
+
+1997-08-20  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* egg.el (minor-mode-alist): Don't show " EGG" in mode line.
+	(egg-mode): Use input method indicator instead.
+
+1997-07-20  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* convert.el (egg-next-candidate): Rename from egg-next-conversion.
+	(egg-previous-candidate): Rename from egg-previous-conversion.
+	(egg-select-candidate): Follow the change of new interface.
+	(egg-source-maxlen-from-here): Likewise.
+
+1997-07-19  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* wnn.el (wnn-start-conversion): Change the interface.  Return ENV
+	and the	list of bunsetsu.  Fix the documentation string too.
+	* convert.el (egg-convert-region): Follow the change.
+	(egg-insert-converted-result): Change the argument.
+	(egg-insert-bunsetsu-list): Rename from egg-insert-converted-result.
+	(egg-insert-bunsetsu): New function.
+	(egg-get-number-of-bunsetsu,egg-get-bunsetsu-info): Removed.
+	(egg-backward-bunsetsu): Don't use bunsetsu-pos.
+
+	* wnn.el (wnn-get-bunsetsu-converted): Change the interface.  Take
+ 	BUNSETSU as the argument instead of ENV and POS.
+	* convert.el (egg-get-bunsetsu-converted): Follow the change.
+
+	* wnn.el (wnn-bunsetsu-create): Take ENV as the first argument.
+	(wnn-list-candidates): Dont take ENV.
+	(wnn-bunsetsu-get-env): New substitution.
+
+	* wnnrpc.el (wnnrpc-receive-sho-bunsetsu-list-sub): Take the argument
+	for ENV, and use it for the argument of wnn-bunsetsu-create.
+	(wnnrpc-receive-sho-bunsetsu-list): Take ENV as the first argument.
+	(wnnrpc-renbunsetsu-conversion): Follow the change.
+
+1997-07-17  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* convert.el (egg-decide-candidate):  Change the interface.
+	Take the argument bunsetsu-info instead of conversion-engine.
+
+	* wnn.el (wnn-get-candidate): Deleted.
+
+	* convert.el (egg-get-all-candidates): Change the interface.
+	Take an argument bunsetsu-info instead of conversion-engine.
+	(egg-select-candidate): Follow the change.
+
+	* convert.el (egg-set-bunsetsu-pos,egg-get-bunsetsu-pos): Deleted.
+	(egg-list-candidates,egg-get-current-candidate-number): New stub.
+	* wnn.el (wnn-bunsetsu-create): Add new member zenkouho-pos.
+	(wnn-bunsetsu-get-zenkouho-pos,wnn-bunsetsu-set-zenkouho-pos): New
+	functions.
+	(wnn-list-candidates,wnn-get-current-candidate-number): New functions.
+	(wnn-set-bunsetsu-pos,wnn-get-bunsetsu-pos): Deleted.
+
+	* convert.el (egg-get-number-of-candidates): Change the interface.
+	Take an argument bunsetsu-info instead of conversion-engine.
+	(egg-next-conversion,egg-select-candidate): Follow the change.
+	* wnn.el (wnn-get-number-of-candidates): Follow the change.
+
+	* wnn.el (wnn-get-bunsetsu-source-afterwards): New function.
+	(wnn-change-bunsetsu-length): Use it.
+
+	* convert.el (egg-get-bunsetsu-source): Change the interface.
+  	Take an argument bunsetsu-info instead of conversion-engine.
+	(egg-enlarge-bunsetsu,egg-shrink-bunsetsu,egg-source-maxlen-from-here):
+ 	Follow the change.
+	* wnn.el (wnn-get-bunsetsu-source): Follow the change.
+
+	Put bunsetsu information on text property.
+	* wnn.el (wnn-get-bunsetsu-info): New function.
+
+	* convert.el (egg-insert-converted-result): Put it on text property.
+	(egg-conversion-backend): Add new interface
+ 	wnn-get-bunsetsu-info.
+	(egg-get-bunsetsu-info): New stub.
+
+1997-07-17  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* its.el (its-state-machine-keyseq, its-state-machine): Handle
+	end-of-input correctly when going backward.
+
+1997-07-16  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* wnn.el (wnn-create-directory): Bug fix.  Really make directory.
+
+1997-07-15  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its-hangul.el (its-define-hangul): Use its-defrule-otherwise.
+
+1997-07-15  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* its-hangul.el: Updated.
+
+1997-06-19  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
+
+	* its-hira.el: its-hira-hankaku-escape --> its-hankaku-escape.
+	its-hira-zenkaku-escape --> its-zenkaku-escape.
+
+1997-06-14  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its.el: Change the data structure of <expr-output-back-list> so
+ 	that it can encourage sharing same structure and it can use same
+ 	structure of SYL.
+	(its-ins/del-SYL-batch): Follow the change of data structure.
+	(its-define-otherwise): Change the argument.
+	(its-defrule-otherwise): New function.
+	(its-eob-keyexpr, its-eob-back, its-make-class+back,
+ 	its-make-otherwise): New substitutions.
+
+1997-06-13  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its-kana.el: New file.  Taken from its/kanainput.el of Mule-2.3.
+
+	* its-hira.el: Use `define-its-state-machine'.
+
+	* its.el (its-zenkaku-escape, its-hankaku-escape): Make them
+ 	defconst.
+	(define-its-state-machine, define-its-state-machine-append): New
+ 	macro.
+
+1997-06-13  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
+
+	* its-hira.el ("n'"): Added.
+
+1997-06-12  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
+
+	its-zenkaku-escape and its-hankaku-escape are also used in hangul.
+	* its.el (its-zenkaku-escape, its-hankaku-escape): Moved to here
+	and rename them.
+	* its-hira.el (its-hira-hankaku-escape, its-hira-zenkaku-escape): 
+	Removed.
+
+	* its.el (its-read-current-its-string): Removed.  There's the
+ 	function `read-multilingual-string' already.
+
+1997-06-12  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* its-hangul.el: New file.
+
+1997-06-10  NIIBE Yutaka  <gniibe@chroot.org>
+
+	Miscellaneous cosmetic changes.
+	* comm.el: New file.  Move communication related funcitons from
+ 	wnnrpc.el.
+	(comm-format-u32c, and others): Rename from wnnrpc-*.
+	* wnnrpc.el (Throughout): Follow the rename.
+
+	* wnn.el (wnnenv-get-in-use-flag): Rename from wnn-e-get-in-use.
+	(wnnenv-set-in-use-flag): Rename from wnn-e-set-in-use.
+	(Others): Rename from wnn-e-*.
+	(wnn-bunsetsu-*): Rename from wnnrpc-b-*, and moved from wnnrpc.el.
+
+	* convert.el (egg-exit-conversion): Call egg-do-auto-fill.
+
+	* its.el (its-translate-region): Bug fix.  End of input.
+	(its-state-machine): Bug fix.  Generate error if
+ 	its-barf-on-invalid-keyseq.
+	(its-exit-mode-internal): Call egg-do-auto-fill.
+
+	* wnnrpc.el (ccl-decode-fixed-euc-jp): Bug fix for ASCII.
+
+	* mlh.el (mlh-space-bar-backward-henkan): Call egg-do-auto-fill.
+
+	* egg.el: Comment out definition of C-\ in global-map.
+
+1997-06-09  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its.el (its-kick-convert-region): Rename from its-convert-region.
+	(its-mode-map): Follow the change.
+
+	(its-make-next-state): Use list instead of cons.
+
+	(its-get-kst/t): Make it substitution.
+	(its-set-kst, its-get-keyseq, its-set-keyseq, its-kst-p, 
+	its-get-output, its-set-output, its-get-keyseq-syl): Likewise.
+	(its-new-state, its-new-map, its-get-indicator, its-set-indicator,  
+	its-get-start-state, its-reset-start-state): Likewise.
+
+	(its-get-next-state): Use assq instead of assoc.
+
+	(its-goto-state): Tune up.
+
+1997-06-08  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* mlh.el: Merge mlh-nihongo.el.
+	* mlh-nihongo.el: Removed.
+
+	* its-hira.el: Moved from its/hira.el.  Move comments to HISTORY.
+	(its-hira-enable-double-n, its-hira-period, its-hira-comma,
+ 	its-hira-open-bracket, its-hira-close-bracket,
+ 	its-hira-horizontal): New variables.
+	Use the variables to define the state-machine.
+
+	Implement non-interactive translation in ITS.
+	* its.el (its-translate-region): New function.
+	(its-latest-SYL): New Variable.
+	(its-state-machine-keyseq): Use it.
+	(its-update-latest-SYL): New function.
+	(its-buffer-ins/del-SYL): Use it.
+	(its-translation-result): New variable.
+	(its-ins/del-SYL-batch): New function.
+	(its-enable-double-n-syntax, its-use-kuten-for-period,
+ 	its-use-touten-for-comma, its-zenkaku-escape, its-hankaku-escape):
+ 	Removed.
+
+	Use ITS, delete mlh's own implementation of automata.
+	* mlh.el (mlh-start-state, mlh-set-of-chars, mlh-start-state-sym,
+	mlh-set-of-chars-sym, mlh-define-automata, mlh-end-of-definition,
+	mlh-defrule, mlh-next-state, mlh-roma-kana-backward): Removed.
+	(mlh-cause-error-when-unknown-romaji-sequence): Removed.
+	(mlh-atoi): Removed.
+	(mlh-white-space, mlh-zenkaku-white): Use string-to-int.
+	* mlh-nihongo.el (mlh-hira-start-state, mlh-hira-chars, and all
+ 	rules of definition which defines the automaton): Removed.
+	(mlh-kanji-with-henkan-region-function): Use its-translate-region.
+	(mlh-hiragana, mlh-katakana): Likewise.
+
+	Fix of CCL.
+	* wnnrpc.el (ccl-decode-fixed-euc-jp): Bug fix for jisx0212.
+	Add missing parens.
+
+	Speed up of unpacking.
+	* wnnrpc.el (wnnrpc-following-char-or-wait): Tune up.
+	(wnnrpc-following+forward-char): New function.
+	(wnnrpc-unpack-u32c, wnnrpc-unpack-u32, wnnrpc-unpack-u16,
+ 	wnnrpc-unpack-u8): Use it.
+	(wnnrpc-accept-process-output): New function.
+	(wnnrpc-unpack-u16-string, wnnrpc-unpack-u8-string,
+ 	wnnrpc-unpack-bytes): Use it.  Use search-forward.
+	(wnnrpc-unpack-u16-string): Use decode-coding-region.
+
+1997-06-07  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* wnn.el (wnn-get-all-candidates): New function.
+	(wnn-set-bunsetsu-pos): Return 0 (instead of -1).
+
+	* convert.el (egg-get-candidate): Removed.
+	(egg-get-all-candidates): New entry function.
+	(egg-conversion-backend): Entry for egg-get-all-candidates.
+	(egg-select-candidate): New function.
+	(egg-conversion-map): Bind "\M-s" and egg-select-candidate.
+
+1997-06-05  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* bushu.el: Renamed from busyu.el.
+	(bushu-break-string, etc): Renamed from busyu*.
+
+	* menu.el: Completely rewritten.
+
+1997-06-03  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
+
+	* its.el (its-reset-start-state): Bug fix.  Delete a CDR.
+
+	Implement "class of key" transition.
+	Change the structure of <state>, the last member is
+	<key-state-table/terminal> instead of <key-state-alist/terminal>.
+	* its.el (its-kst-p): Rename from its-ksa-p.
+	(its-get-next-state): Follow the change of the data structure.
+	(its-state-machine): Likewise.
+	(its-make-next-state): Likewise.
+	(its-set-kst): New function.
+	(its-get-otherwise): New function.
+	(its-otherwise-match): New function.
+	(its-define-otherwise-terminate-here): Removed.
+	(its-define-otherwise): New function.
+	(its-defrule*): Use its-define-otherwise.
+
+	* its/hira.el (n): Use its-define-otherwise.
+
+1997-06-02  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* wnnrpc.el (wnnrpc-receive-sho-bunsetsu-list-sub,
+ 	wnnrpc-receive-sho-bunsetsu-list-sub-2): Splited from
+	wnnrpc-receive-sho-bunsetsu-list.
+	(wnnrpc-receive-dai-bunsetsu-list): New function.
+	(wnnrpc-daibunsetsu-conversion, wnnrpc-get-daibunsetsu-candidate): 
+	New function.
+
+1997-06-01  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* wnnrpc.el (ccl-decode-fixed-euc-jp): Clean it up.
+	(wnnrpc-file-attribute): Rename from wnnrpc-stat-file.
+	(wnnrpc-get-dictionary-list-with-environment): Rename from
+	wnnrpc-get-dictionary-list-with-environment.
+
+	Implement RPC more.
+	* wnnrpc.el (wnnrpc-who, wnnrpc-get-env-list, wnnrpc-kill,
+ 	wnnrpc-delete-dictionary, wnnrpc-set-flag-on-dictionary,
+ 	wnnrpc-get-dictionary-list, wnnrpc-delete-word,
+ 	wnnrpc-receive-word, wnnrpc-search-word,
+ 	wnnrpc-search-word-in-dictionary, wnnrpc-get-word-info,
+ 	wnnrpc-set-comment-on-word, wnnrpc-get-dictionary-info,
+ 	wnnrpc-set-file-comment, wnnrpc-hinshi-name,
+ 	wnnrpc-set-file-password, wnnrpc-set-hinshi-table): New functions.
+
+1997-05-31  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* wnnrpc.el (wnnrpc-format-u32c, wnnrpc-unpack-u32c): New
+ 	substitutions.  Support 32-bit number represented in cons cell of
+ 	a pair of 16-bit integer.
+	(wnnrpc-format, wnnrpc-unpack): Handle u32c (U).
+
+	(wnnrpc-format-bytes, wnnrpc-unpack-bytes): New substitutions.
+  	Support byte stream end with 255(-1).
+	(wnnrpc-format, wnnrpc-unpack):  Handle bytes (B).
+
+	(wnnrpc-local-file-loaded): New function.
+	(wnnrpc-call-with-proc-1): New macro.  Assume the buffer is the one
+	of process.
+
+1997-05-29  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* wnnrpc.el (wnnrpc-get-conversion-parameters, wnnrpc-file-loaded,
+ 	wnnrpc-write-file, wnnrpc-get-fuzokugo-file, wnnrpc-get-file-list,
+ 	wnnrpc-get-file-list-with-env, wnnrpc-stat-file,
+ 	wnnrpc-get-file-info): New functions.
+	wnnrpc-receive-file-list): New subst.
+
+1997-05-29  Kenichi Handa  <handa@etl.go.jp>
+
+	* wnnrpc.el (ccl-decode-fixed-euc-jp): Tune it up.
+
+1997-05-29  Hisashi Miyashita  <himi@bird.scphys.kyoto-u.ac.jp>
+
+	* wnnrpc.el (fixed-euc-jp, ccl-decode-fixed-euc-jp,
+	ccl-encode-fixed-euc): New private coding system.  Encode/decode
+	CCL for it.
+
+1997-05-27  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* wnnrpc.el (wnnrpc-tanbunsetsu-conversion): Change the argument.
+	(wnnrpc-get-bunsetsu-candidates): Likewise.
+	(wnnrpc-renbunsetsu-conversion): Likewise.
+
+	* wnn.el (wnn-change-bunsetsu-length): Follow the change.
+	(wnn-set-bunsetsu-pos): Likewise.
+	(wnn-change-bunsetsu-length, wnn-start-conversion): Likewise.
+
+1997-05-25  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* wnnrpc.el (wnnrpc-add-word, wnnrpc-get-dictionary-list,
+	wnnrpc-receive-dictionary-list, wnnrpc-get-writable-dictionary-list,
+	wnnrpc-get-hinshi-list, wnnrpc-hinshi-number): New functions.
+	(wnnrpc-unpack-u16-string): Bug fix for the case of ASCII string.
+
+	* wnn.el (wnn-dictionary-specification): Add dictionaries of
+	gerodic and ones of WNN consortium.
+
+	Implement a false path.
+	* wnnrpc.el (wnnrpc-renbunsetsu-conversion): Generate an error on
+ 	failure.
+	(wnnrpc-get-bunsetsu-candidates): Ditto.
+	(wnnrpc-tanbunsetsu-conversion): Ditto.
+
+	Implement a false path.  Error recovery.
+	* wnn.el (wnn-create-directory, wnn-open-dictionary,
+ 	wnn-open-frequency, wnn-query-del/create-frequency): New function.
+	(wnn-set-dictionary-sub): New function.
+
+1997-05-24  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* wnnrpc.el (wnnrpc-version, wnnrpc-access, wnnrpc-mkdir,
+ 	wnnrpc-create-dictionary, wnnrpc-create-frequency, 
+	wnnrpc-discard-file, wnnrpc-remove-file): New functions.
+	(wnnrpc-test-result-and-get-error): New subst.
+
+	Implement a false path from wnnrpc-set-fuzokugo-file.
+	* wnnrpc.el (wnnrpc-set-fuzokugo-file): Return negate-encoded
+ 	error code on failure.
+	* wnn.el (wnn-create-environment): Generate an error message.
+
+	Implement a false path from wnnrpc-open-file.
+	* wnnrpc.el (wnnrpc-open-file): Change the interface.  Return
+	negate-encoded error code on failure.
+	* wnn.el (wnn-open-file): New function.
+	(wnn-create-environment): Handle return value, and generate
+	an error message for wnnrpc-set-fuzokugo-file on failure.
+	(wnn-set-dictionary): Handle return value.
+
+1997-05-17  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* wnnrpc.el (wnnrpc-error-message): Error strings taken from
+ 	Wnn-4.2 distribution.
+	(wnnrpc-errono): Removed.
+
+	Implement a false path from wnnrpc-open.
+	* wnnrpc.el (wnnrpc-open): Change the interface.  Return NIL on
+ 	success, error code on failure.
+	* wnn.el (wnn-open): Delete process and buffer.
+	Generate an error on failure.
+	(wnn-get-environment): Follow the change (none).
+	(wnn-start-conversion): Follow the change (none).
+	* convert.el (egg-convert-region): Follow the change.  Call
+ 	delete-region after egg-start-conversion.
+
+	Implement a false path from wnnrpc-connect.
+	* wnnrpc.el (wnnrpc-connect): Change the interface.  Return
+ 	negate-encoded error code on failure.
+	* wnn.el (wnn-create-environment): Generate an error on failure.
+	(wnn-get-environment): Follow the change.  On failure, don't
+	register the environment to wnn-environments.
+
+1997-05-16  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
+
+	Dynamically allocate environment arbitrarily.
+	* wnn.el (wnn-create-environment): Change the structure of ENV.
+	(wnn-e-get-in-use, wnn-e-set-in-use): New subst.
+	(wnn-end-conversion): Call wnn-e-set-in-use.
+	(wnn-get-environment, wnn-find-env-not-in-use): New function.
+	(wnn-start-conversion): Call wnn-get-environment.
+
+	* wnn.el (wnn-fini): Implemented.
+
+1997-05-15  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* convert.el (egg-start-conversion): Change the interface.
+	(egg-convert-region): Follow the change.
+	(egg-open-if-not): Removed.
+	* wnn.el (wnn-start-conversion): Follow the change.
+
+	* wnn.el (wnn-environment-list): Removed.
+	(wnn-environment-serial): Removed.
+	(wnn-connect-and-init): Removed.
+	(wnn-environments): New variable which holds all environments.
+
+1997-05-15  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
+
+	* wnn.el (wnn-change-bunsetsu-length): Bug fix.  Last argument to
+ 	wnnrpc-b-set-freq-down is list of bunsetsu.
+
+	* mlh.el (mlh-do-spacing): Emacs 20 related changes.  
+	Use category-set-mnemonics, and char-category-set.
+	According to suggestion by Kenichi Handa <handa@etl.go.jp>.
+
+1997-05-15  MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+	* wnn.el (wnn-usr-dic-dir): New variable.
+	(wnn-filename): Use wnn-usr-dic-dir.
+
+	* its.el (its-defrule): New argument `enable-overwrite'.
+
+1997-05-14  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* convert.el (egg-exit-conversion-unread-char): Use newer variable
+ 	unread-command-events, as unread-command-char is obsolete.
+	(egg-shrink-bunsetsu, egg-source-maxlen-from-here,
+ 	egg-enlarge-bunsetsu, egg-next-conversion, egg-exit-conversion,
+ 	egg-exit-conversion, egg-insert-converted-result): New property
+ 	EGG-CONVERSION-ENGINE, which specifis backend.
+
+	(egg-start-conversion, egg-get-number-of-bunsetsu,
+ 	egg-get-bunsetsu-converted, egg-set-bunsetsu-pos,
+ 	egg-get-bunsetsu-pos, egg-get-number-of-candidates,
+ 	egg-get-candidate, egg-decide-candidate,
+ 	egg-change-bunsetsu-length, egg-get-bunsetsu-source,
+ 	egg-end-conversion): Change the interface, new argument c.
+	* wnn.el (wnn-start-conversion, wnn-get-number-of-bunsetsu,
+	wnn-get-bunsetsu-converted, wnn-set-bunsetsu-pos, 
+	wnn-get-bunsetsu-pos, wnn-get-number-of-candidates, 
+	wnn-get-candidate, wnn-decide-candidate, 
+	wnn-change-bunsetsu-length, wnn-get-bunsetsu-source, 
+	wnn-end-conversion): Likewise.
+
+	* convert.el (egg-open-if-not): Change the interface.  Return
+ 	conversion backend.
+
+	* wnnrpc.el (wnnrpc-following-char-or-wait, wnnrpc-unpack-u32,
+ 	wnnrpc-unpack-u16, wnnrpc-unpack-u8, wnnrpc-unpack-u16-string,
+ 	wnnrpc-unpack-u8-string): Change the interface to avoid
+ 	compilation warnings.
+	(wnnrpc-unpack): Use new interface.
+
+	* wnn.el (wnn-open): Change the name of WNN buffer as debug has
+ 	been done.
+
+1997-05-11  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* wnnrpc.el (wnnrpc-following-char-or-wait): Rename from
+ 	wnn-following-char-or-wait.
+	(wnnrpc-following-char-or-wait): Declare with DEFUN instead of
+ 	DEFSUBST.
+
+1997-05-10  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* Throughout: Use JUNET coding system for file format.
+
+	* mlh.el: Move some comments to HISTORY.
+	(mlh-version): Removed.
+	Remove all autoload entries.
+	(henkan-region-function): Removed.
+	(member): Don't need any more.
+
+	* mlh-nihongo.el: Renamed from nihongo.el.
+
+	* mlh.el (mlh-space-bar-backward-henkan): call egg-convert-region
+ 	directly.
+	(mlh-space-bar-backward-henkan): Fix for Emacs 20.
+	Don't call egg:do-auto-fill.
+	(mlh-backward-henkan): Use set-marker-insertion-type.
+	(mlh-do-spacing): Char-category.
+
+	* mlh.el, nihongo.el: Taken from mlh-1.002 distribution.
+
+1997-05-07  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* convert.el (egg-update-frequency): Removed.
+	(egg-conversion-backend): Remove entry for update-frequency.
+
+	* wnn.el (wnn-dictionary-specification): Change parameters
+	according to suggestion by Tomoko Yoshida in mule-jp@etl.go.jp.
+	Original had been taken from wnn-4.2.
+
+1997-05-06  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* convert.el (egg-next-conversion): Bug fix.  It's max+ instead of n.
+
+1997-05-05  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* wnnfns.c (Fwnn_get_bunsetsu_converted): Rename from
+	get-converted-bunsetsu.
+	(Fwnn_get_bunsetsu_source): Ditto.
+	* convert.el (egg-get-bunsetsu-converted): Ditto.
+	(egg-get-bunsetsu-source): Ditto.
+
+	* wnn.el (wnn-create-environment): New file which mimics API of
+	wnnfns.c.
+
+1997-04-29  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* wnnrpc.el: New file which implements Remote Procedure Calls of WNN.
+
+1997-04-16  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its/kanainput.el (normal-pair): Use its-defrule*.
+
+	* its.el (its-defrule*): Rewritten.
+
+	* its/hira.el ("n"): Alternative implementation using 'otherwise'.
+
+	* its.el (its-processing-map): Removed.
+	(its-register-map): Rename from its-set-map.
+	(its-register-map): Remove first argumet NAME.
+	(its-defrule): Remove last optional argument END.
+	(its-define-otherwise-terminate-here): New function.
+	(its-goto-state): New function.
+	(its-defrule, its-defoutput): Use its-goto-state.
+
+1997-04-12  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its.el: Enhance meaning of ITS state machine.  Now, <key>
+ 	includes representation of "ANY of key stroke" (-2).
+	(its-defrule): New feature end=='otherwise.
+	(its-defrule*): New function.
+	(its-state-machine): Implement otherwise-terminate-before-this-key.
+
+	* its/kanainput.el (its-k-zenkaku-escape, its-k-hankaku-escape,
+ 	its-k-symbols-escape): Add prefix its-.  Let them defconst.
+	"W": Move the definition beginning to avoid error.
+
+1997-03-26  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* convert.el (egg-next-conversion): -1 goes to end of bunsetsu.
+
+1997-03-25  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* egg.el (egg-mode-on, egg-input-mode, egg-in-fence-mode): Deleted.
+	(egg-fence-face-on, egg-fence-face-off): Deleted.
+	(egg-region-start, egg-region-end): Deleted.
+
+1997-03-24  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its/hira.el ("n"): Add "z" and "?" for prefetch char of "n".
+
+	Implement conversion mode.
+	* convert.el: New file.
+
+1997-03-23  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its.el (its-mode-map): As "\C-g" is used in global-map, use
+ 	"\C-]" instead (for its-cancel-input).
+
+1997-03-22  NIIBE Yutaka  <gniibe@chroot.org>
+
+	Introduce new scheme to specify server.
+	* wnnfns.c (Qjserver, Qcserver, Qtserver, Qkserver): Removed.
+	(Vwnn_server_type): Integer variable.
+	(wnn_get_server_type): Renamed from wnn_check_server_type.
+	(charset_wnn_server_type): Renamed from lc_wnn_server_type.
+
+	Introduce new scheme to specify uniqueness.
+	* wnnfns.c (Qwnn_no_uniq, Qwnn_uniq, Qwnn_uniq_kanji): Removed.
+	(Vwnn_uniqueness_specifier): Integer variable.  Renamed from
+	wnn_uniq_level.
+
+1997-03-21  NIIBE Yutaka  <gniibe@chroot.org>
+
+	Cosmetic changes.
+	* wnnfnc.c (Throughout): Change Lisp function name to follow the
+ 	format of wnn-VERB-OBJECT.
+	Use XFASTINT instead of XINT, if appropriate.
+	
+	* wnnfns.c (Fwnn_fuzokugo_set): Merged with wnn-set-fuzokugo of
+ 	wnn-egg.el.
+
+	* wnn-egg.el (wnn-set-fuzokugo): Deleted.
+
+	* wnnfns.c (Fwnn_dict_add): Merged with wnn-add-dict of wnn-egg.el.
+	* wnn-egg.el (wnn-add-dict): Deleted.
+
+	* wnn-egg-msg.el (wnn-msg-get): Renamed from egg-msg-get.
+	(wnn-message-alist): Renamed from egg-message-alist.
+	Use defconst.
+
+	* wnnfns.c (wnn_check_server_type): Renemed from
+ 	check_wnn_server_type.
+
+	* wnn-egg-msg.el (egg-error): Deleted.  Not useful enough.
+	* wnn-egg.el (Throughout): Replace egg-error by error.
+
+	* egg.el (egg-sai-henkan-start, egg-sai-henkan-end,
+ 	egg-old-bunsetu-suu): Moved from wnn-egg.el.
+
+	* wnn-egg.el (Throughout): Change variable name and function name.
+	Added wnn- prefix, egg- prefix.
+	* wnn-egg.el: Delete historical defaliases.  Only support 
+	wnn-set-[cjk]server-hostname.
+
+	* wnn6.el: New file.  Discriminate Wnn6 related functions.
+	* eggrc-wnn6: New file.  Discriminate Wnn6 related setting.
+
+	* egg-fence.el: Removed.
+
+1997-03-20  NIIBE Yutaka  <gniibe@chroot.org>
+
+	Distingush continuation of egg-mode and turn off of egg-mode.
+	* its.el (its-mode-map): Bind "\C-\\" to its-exit-mode-no-egg.
+	(its-exit-mode-internal): New argument egg-mode-flag.
+	(its-exit-mode-no-egg): New Function.
+
+	Rethink about keymap.  Once, the intention of egg-mode-map has
+ 	been to override ALL of the keymap.  That's so selfish, and not
+ 	friendly to other parts of Emacs.  This implementation intend to
+	be more friendly with other keymaps.
+	* its.el (its-mode-map): Remove definition of "\C-c" for
+ 	its-cancel-input, as C-c has special meaning in Emacs.  We should
+ 	not re-define it.  
+	Remove definition of "\C-q" for its-select-previous-map.  
+	Remove definition of "\C-_" for egg-jis-code-input.  
+	Remove definition of "\C-w", "\C-@", [?\C-\ ] for
+ 	egg-henkan-fence-region.
+
+	Implement START/CURSOR/END scheme.
+	* its.el (its-input-to-vsyl): New function.
+	(its-beginning-of-input-buffer): New function.
+	(its-end-of-input-buffer): New function.
+	(its-backward-SYL): New function.
+	(its-forward-SYL): New function.
+	(its-delete-SYL): New function.
+	(its-delete-backward-SYL): New function.
+	(its-delete-backward-SYL-internal): New function.
+	(its-delete-backward-within-SYL): New function.
+	(its-delete-by-keystroke): New Variable.
+	(its-exit-mode): New function.
+	(its-exit-mode-internal): New function.
+
+	* its.el (its-standard-map-list, its-find, its-next-map,
+ 	its-previous-map): Deleted.
+	(its-get-indicator): Delete duplicated definition.  Leave one which
+	takes <map> argument.
+	(its-input): Rename from its-input-subsubsub.
+
+	* egg.el (egg-mode-map): Don't include SPACE.
+
+	Introduce CURSOR.
+	* its.el (its-state-machine): Add new argument EMIT.  Return CURSOR.
+	(its-state-machine-keyseq): Likewise.
+	(its-input-subsubsub): Return CURSOR.
+	(its-input-subsub): Deleted.
+	(its-DSYL-p): Deleted.
+	(its-buffer-insert-SYL-list): Deleted.
+	(its-buffer-ins/del-SYL): New function.
+	(its-input-end): Change the argument to P of point, and return VOID.
+
+	Change structure of <map>.  <start-state> is normal <state>.
+	(its-new-map): Follow the change of structure.
+	(its-get-indicator, its-set-indicator, its-reset-start-state): 
+	Likewise.
+	(its-reset-start-state): Renamed from its-reset-start.
+
+	Don't use <input-buffer>, but introduce new scheme of SYL property.
+	(its-change-t-to-nil, its-nil-index, its-bytes-between,
+ 	its-delete-between, its-move-nil--->, its-move-nil-<--,
+ 	its-move-nil-<--sub, its-move-nil-to-last, its-move-nil-to-first):
+	Deleted.
+
+1997-03-19  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its.el: Change the structure of DSYL.  Same as <state>.
+	(its-input-subsub): Follow the change of structure.
+	(its-make-DSYL): Deleted.
+	(its-get-keyseq-cooked): New function.
+
+	Swap the meaning of T/NIL of <SYL>.
+
+	Delete the structure of <input-buffer>.
+	(its-new-input-buffer): Deleted.
+	(its-input-subsub): Remove the argument SYLP.
+	(its-input, its-input-sub, its-init-text-properties): Deleted.
+
+	Introduce START, END and CURSOR.
+
+1997-03-19  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
+
+	Global-map should be used, for key sequence not defined by
+ 	its-mode-map and/or egg-mode-map.   Don't mask other maps.
+	* its.el (its-mode-esc-map): Deleted.
+	(its-mode-map): Include define-key of the esc-map here.
+	* egg.el (egg-mode-esc-map): Deleted.
+	(egg-mode-map): Include define-key of the esc-map here.
+	
+1997-03-18  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its.el (its-input): Rename from its-input-input-buffer.
+	(its-state-machine): Handle END of input (key == -1).
+
+	ITS minor mode deleted.  It's implemented by local-map of text
+ 	properties.
+	(its-mode): Remove the variable.
+	(its-mode): Remove the function.
+
+	* its.el (<input-buffer>): Change the order of <SYL> list.  
+	(car sylp) is last entry of the list.
+	(its-input-buffer): Deleted.  It's now a member of text
+ 	properties.
+	(<map>): Change the structure.  Start state should have "" for keyseq.
+	(its-get-start-state): Follow chage of the <map> structure.
+	(its-reset-start, its-set-indicator, its-get-indicator): Likewise.
+	(its-new-state, its-new-map): Split from its-new-state/map.
+	(its-make-map): Deleted.
+
+1997-03-17  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its.el (its-buffer-insert-SYL-list): Use insert-and-inherit to
+ 	inherit properties.
+	(its-fence-overlay): Removed. Don't use overlay, as it has no
+ 	information in undo-list.
+
+1997-03-16  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its/hira.el ("n"): Use new feature END.
+	("ppy", "bby", "ddy", "jjy", "zzy", "ggy", "lly", "rry", "hhy",
+ 	"cch", "tts", "tty", "ssh", "ssy", "kky"): its-defoutput.
+
+	* its.el (its-defrule): Add argument END.
+	(its-buffer-delete-SYL): Bug fix. Use length instead of string-width.
+
+1997-03-15  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its.el (its-input-input-buffer): Implement the case of DSYL.
+
+1997-03-14  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its.el (its-buffer-delete-SYL): Handle the case of NIL.
+
+	* its/hira.el: Implement "kka" and others.  Implemlement "N".
+	(digit-characters, symbol-characters, downcase-alphabets,
+ 	upcase-alphabets): Delete useless defvar-s.  
+
+1997-03-14  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
+
+	* its/hira.el ("roma-kana"): Follow change of implementation of
+	state machine.
+
+	Correct the abuse of the word "MODE".  It seems that it's direct
+ 	influence of "mode" in Emacs, but it's not mode at all.
+	* its.el (its-map-alist): Renamed from its-mode-alist.
+	(its-get-map): Renamed from its-get-mode-map.
+	(its-set-map): Renamed from its-set-mode-map.
+	(its-define-state-machine): Renamed from its-define-mode.
+	(its-select-map-menu): Renamed from its-select-mode-menu.
+	(its-select-map-from-menu): Renamed from its-select-mode-from-menu.
+	(its-standard-map-list): Renamed from its-standard-modes.
+	(its-next-map): Renamed from its-next-mode.
+	(its-previous-map): Renamed from its-previous-mode.
+	(its-select-map): Renamed from its-select-mode.
+	(its-get-indicator): Renamed from its-get-mode-indicator.
+
+	(its-select-map-from-menu): As it's not mode, don't need offer hooks.
+	(its-next-map): Likewise.
+	(its-previous-map): Likewise.
+	(its-select-map): Likewise.
+
+	Change the implementation of its-mode-alist.  Name is in <map> now.
+	* its.el (its-get-mode-map): Just do assoc.
+	(its-set-mode-map): Simplified.
+
+	* its.el (its-get-indicator): Renamed from its-map-indicator.
+	(its-set-indicator): Renamed from its-map-set-indicator.
+	(its-get-start-state): Renamed from its-map-start.
+	(its-new-state): Change the argunents.
+	(its-map-set-start): Removed.
+	(its-reset-start): New function.
+
+	Remove old implemantation of translator.
+	* its.el (its-resize, its-maps, its-actions, its-inputs,
+ 	its-level, its-maxlevel, its-char-from-buff, its-interactive):
+ 	Removed.
+	(its-make-action, its-reset-maps, its-current-map,
+ 	its-previous-map, its-level, its-enter-newlevel, its-reset-input,
+ 	its-flush-input-before-point, its-peek-char, its-read-char):
+ 	Removed.
+	(its-push-char, its-ordinal-charp, its-delete-charp): Removed.
+	(its-translate-region): Removed.
+	(its-buff-s, its-buff-e): Removed.
+	(its-state-terminalp): Removed.
+
+	Remove selection of candidates in map, it's questionable to
+ 	implement this feature with SYL.  Might rethink in future.
+	(its-make-menu-from-map-result, its-make-alist-from-map-result):
+ 	Removed.
+	(its-make-menu-from-map, its-make-menu-from-map*): Removed.
+	(its-make-alist-from-map, its-make-alist-from-map*): Removed.
+	(its-completing-read): Removed.
+	(its-minibuffer-local-must-match-map,
+ 	its-minibuffer-local-completion-map): Removed.
+	(its-minibuffer-completion-help, car-string-lessp,
+ 	its-temp-echo-area-contents): Removed.
+
+	Implement SYL-based state machine.
+	* its.el (its-input-buffer, its-barf-on-invalid-keyseq): New variables.
+	(its-new-input-buffer): New function.
+	(its-self-insert-char): New command.
+	(its-initial-ISYL, its-make-DSYL, its-make-VSYL,
+ 	its-input-input-buffer, its-input-input-buffer-sub,
+ 	its-state-machine, its-state-machine-keyseq, 
+	its-buffer-delete-SYL, its-buffer-insert-SYL-list,
+ 	its-get-next-state, its-get-ksa/b, its-get-keyseq, its-ksa-p,
+	its-get-output): New function.
+	(its-get-KAS): Removed.
+	(its-get-state, its-get-action, its-set-action): Removed.
+	(its-make-KAS, its-get-KAS): Removed.
+
+	* its.el (its-defrule-sub): Merged into its-defrule.
+
+1997-03-13  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
+
+	* its.el: (its-define-mode): Change the arguments.
+	* its/zhuyin.el ("zhuyin"): Follow the changes of its-define-mode.
+	* its/zenkaku.el ("zenkaku-downcase"): Likewise.
+	* its/pinyin.el ("PinYin"): Likewise.
+	* its/kata.el ("roma-kata"): Likewise.
+	* its/kanainput.el ("kanainput"): Likewise.
+	* its/hira.el ("roma-kana"): Likewise.
+	* its/hankaku.el ("downcase"): Likewise.
+	* its/hangul.el ("hangul"): Likewise.
+	* its/han-kata.el ("roma-han-kata"): Likewise.
+
+	* its.el (its-action-output, its-action-next, its-get-next-map,
+ 	its-set-next-map): Removed.
+	(its-make-next-state): New function.
+	(its-make-state): Removed.
+
+	* its.el (its-defrule-sub): Renamed from `its-defrule**'.
+
+	* wnnfns.h: New file.  Macros for WNN6 are defined here.
+	* wnn6fns.c: New file.  Moved from wnnfns.c for WNN6 specific
+ 	functions.
+
+1997-03-12  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* wnnfns.c: cosmetic changes (indentation, commenting-out-style,
+ 	and compare to Qnil, etc).
+	Get rid of "register" qualifier.
+
+1997-03-05  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its.el (its-define-mode): Change internal structure.  Completely
+ 	rewritten.
+	(its-make-map): Function to make map.
+	(its-make-state): New function.  Make new state.
+	(its-make-KAS): New function.  Make Key-Action-State triad.
+	(its-state-terminalp): New function.  True when the state is
+ 	terminal.
+	(its-map-indicator, its-map-set-indicator,): Changed.
+	(its-map-terminalp, its-map-incrementalp,
+ 	its-map-set-incrementalp, its-map-alist, its-map-set-alist,
+ 	its-map-action, its-map-set-action): Removed.
+
+	(its-defrule-verbose): Deleted.  Seems debug purpose variable.
+
+	(its-make-map): Removed <state>.  It was useless space eater.
+	(its-map-indicator, its-map-set-indicator, its-map-alist,
+ 	its-map-set-alist, its-map-action, its-map-set-action): Follow the
+ 	change.
+	(its-define-mode): Likewise.
+	(its-defrule**): Change the argument.  Delete STATE.
+	(its-defrule): Likewise.
+	(its-map-state, its-map-set-state): Removed.
+
+	<topmap>: Changed the structure.  Introduce <incrementalp>, which
+ 	is t on hangul-map, zhuyin-map, and kanainput-map.
+	(its-define-mode): Change the arguments.  INDICATOR and RESET is 
+	always required.  Add new argument INCREMENTALP.
+	* its/kanainput.el ("kanainput"): Use new API of its-define-mode.
+	* its/hangul.el ("hangul"): Likewise.
+	* its/zhuyin.el ("zhuyin"): Likewise.
+	* its.el (its-make-terminal-state-sofar): Removed.
+	(its-default-make-terminal-state): Removed.
+	(its-make-terminal-state): Removed
+	(its-make-non-terminal-state): Removed.  Not used.
+	(its-map-incrementalp, its-map-set-incrementalp): New functions.
+	
+1997-03-04  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* its.el (its-defrule-conditional, its-defrule-conditional*):
+ 	Removed.  Evaluating cond clause at runtime is stupid.  Rules
+ 	should be determined at compile time, not at run time.
+	(its-get-action): Simplified.  It's always standard.
+	(its-make-terminal-state-sofar): Likewise.
+	(its-make-action): Renamed from its-make-standard-action.
+	(its-standard-actionp): Removed.  No use.
+	(its-translate-region): Simplified.
+
+	(its-map-topmap-p): Removed.  No use.
+
+	(its-simple-actionp, its-collect-simple-action): Removed. No use.
+
+	(its-insert-output-string, its-display-status-string): Removed.
+  	It seemd these variables is to debug ITS itself.
+	(its-translate-region): Simplified.
+	
+	* its/hira.el (".", ",", "n", "nn"): Rules should be determined at
+ 	compile time.
+	* its/han-kata.el: Likewise.
+	* its/kata.el: Likewise.
+
+	* its.el (its-make-standard-action): Simplified.
+	(its-make-standard-action): Remove alternative output.
+	(its-standard-actionp): Simplified.
+	(its-action-next): Simplified.
+	(its-select-alternative-output-menu): Removed.  Not used at all.
+	(its-select-alternative-output): Ditto.
+
+	* its/han-kata.el, its/zenkaku.el, its/kata.el, its/kanainput.el,
+ 	its/hira.el, its/hankaku.el: Add (require cl).
+
+	* its.el (its-enable-double-n-syntax, its-use-kuten-for-period,
+ 	its-use-touten-for-comma, its-zenkaku-escape, its-hankaku-escape):
+ 	Declare here.  Add prefix `its-'.  ):
+
+	(its-defrule, its-defrule*): Remove MAP argument.
+	Merged into its-defrule.
+
+1997-03-04  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
+
+	* its.el (its-completing-input-menu): Removed.  Not used.
+	(its-completing-input): Ditto.
+	(its-translate-region): Remove (null action) clause.  It's identical
+	to 't' case.
+
+	(its-map-supers): Deleted.
+	(its-map-set-supers): Ditto.
+	(its-get-next-map-locally): Deleted.
+
+	(its-define-mode): Remove supers.
+	(its-make-map): Likewise.
+
+	(its-simulate-input): sref -> aref. add char-bytes -> +1.
+	(its-defrule**): Likewise.
+
+	(its-flush-input-before-point): Delete useless save-excursion.
+	(its-push-char): Likewise.
+	(its-translate-region): Likewise.
+
+	* its/zhuyin.el (its-make-terminal-state):
+	* its/kanainput.el (its-make-terminal-state):
+	* its/hangul.el (its-make-terminal-state):
+	Use its-make-terminal-state-sofar.
+
+	* its/kanainput.el (its-make-terminal-state-kanainput): Removed.
+
+	* its.el (its-make-terminal-state-sofar): Renamed.
+ 	(was: its-make-terminal-state-hangul)
+
+	* its/han-kata.el (its-select-hankaku-katakana): Renamed.
+	(was: its:select-hankaku-katakana).
+
+	* its.el (its-map-topmap-p, its-map-supers, its-map-set-supers,
+ 	its-map-terminalp, its-map-state, its-map-set-state,
+ 	its-map-indicator, its-map-set-indicator, its-map-action,
+ 	its-map-set-action, its-map-alist, its-map-set-alist,
+ 	its-get-action, its-action-output, its-action-next,
+ 	its-get-next-map, its-get-next-map-locally, its-set-next-map,
+ 	its-collect-simple-action, its-read-current-its-string,
+ 	its-make-map): Add prefix 'its-'.
+
+	* its.el (its-defrule-select-mode-temporally): Deleted.
+	(its-select-mode-temporally): Deleted.
+	(its-select-previous-mode): Deleted.
+
+	* its/hira.el ("q", "Q"): Removed.
+
+	* its.el (its-defrule**): Don't call coerce-internal-string.
+	(map-state-string): Removed.
+	(its-default-make-standard-non-terminal-state): Don't call
+ 	map-state-string.
+
+	* egg.el (characterp, coerce-internal-string, coerce-string): Removed.
+
+	* its.el (its-insert-char): Deleted.
+	(its-internal-mode-alist): Removed.
+	(its-set-mode-map, its-define-mode): Remove internalp.
+	(its-set-mode-indicator): Removed.
+
+	* egg-fence.el (egg-fence-self-insert-command): Add prefix 'egg-'.
+
+	* its.el (fence-self-insert-command): Move to egg-fence.el.
+
+	* egg-fence.el (egg-exit-fence-mode): Renamed (egg-fence-exit-mode).
+	(egg-enter-fence-mode-and-self-insert): Deleted.
+
+	* egg.el (egg-quit-egg-mode): Deleted.
+
+	* egg-misc.el (egg-fence-toggle-egg-mode): Add prefix 'egg-'.
+	(egg-fence-toggle-egg-mode): beep -> ding.
+	(global-map): bind C-\ to egg-enter-fence-mode.
+
+1997-03-02  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* egg-henkan.el: New file.
+
+	Use new API (egg-get-bunsetu-kanji, egg-get-bunsetu-yomi,
+ 	egg-is-dai-bunsetu, bunsetu-suu, egg-hindo-update,
+ 	egg-get-bunsetu-end).
+
+	* wnn-egg.el: Move egg-henkan-* to egg-henkan.el.
+
+	* wnn-egg.el (egg-startup-file-search-path): Remove current
+ 	directory.
+	(egg-open-wnn): Renamed from EGG-open-wnn.
+	(bunsetu-suu): New function.
+	(egg-get-bunsetu-kanji, egg-get-bunsetu-yomi): New function.
+	(egg-is-dai-bunsetu): New function.
+	(egg-hindo-update): New function.
+	(egg-get-bunsetu-end): New function.
+	
+	(egg-henkan-region, egg-gyaku-henkan-region,
+ 	egg-henkan-region-internal, egg-henkan-paragraph,
+ 	egg-gyaku-henkan-paragraph, egg-henkan-sentence,
+ 	egg-gyaku-henkan-sentence, egg-henkan-word, egg-gyaku-henkan-word,
+ 	egg-henkan-insert-kouho, egg-henkan-kakutei,
+ 	egg-henkan-kakutei-first-char, egg-henkan-kakutei-before-point,
+ 	egg-sai-henkan, egg-henkan-goto-bunsetu,
+ 	egg-henkan-forward-bunsetu, egg-henkan-backward-bunsetu,
+ 	egg-henkan-first-bunsetu, egg-henkan-last-bunsetu,
+ 	egg-henkan-hiragana, egg-henkan-katakana, egg-henkan-next-kouho,
+ 	egg-henkan-next-kouho-dai, egg-henkan-next-kouho-sho,
+ 	egg-henkan-previous-kouho, egg-henkan-previous-kouho-dai,
+ 	egg-henkan-previous-kouho-sho, egg-henkan-goto-kouho,
+ 	egg-henkan-bunsetu-chijime-dai, egg-henkan-bunsetu-chijime-sho,
+ 	egg-henkan-bunsetu-nobasi-dai, egg-henkan-saishou-bunsetu,
+ 	egg-henkan-saichou-bunsetu, egg-bunsetu-length-henko,
+ 	egg-henkan-quit, egg-henkan-select-kouho,
+ 	egg-henkan-select-kouho-dai, egg-henkan-select-kouho-sho,
+ 	egg-henkan-word-off, egg-henkan-kakutei-and-self-insert,
+ 	egg-henkan-mode-map, egg-henkan-mode-esc-prefix,
+ 	egg-henkan-help-command, egg-henkan-inspect-bunsetu):
+ 	Add prefix `egg-'.
+
+	(egg-henkan-mode-in-use): Deleted.
+	(set-egg-henkan-mode-format): Deleted.  Don't need.
+
+	(disconnect-wnn): Let it be normal function, instead of command.
+	(close-wnn): Ditto.
+
+	(set-jserver-host-name, set-kserver-host-name,
+ 	set-cserver-host-name): Use defalias.
+
+	(close-wnn): Take an argument of wnn-server-type.
+	(wnn-egg-kill-emacs-function, set-wnn-host-name,
+ 	set-cwnn-host-name, set-kwnn-host-name): Likewise.
+
+	* egg.el (egg-global-map-backup): Deleted.
+	(egg-local-map-backup): Deleted.
+	(egg-insert-after-hook): it's global variable, nod buffer-local.
+
+	* egg-fence.el (egg-henkan-fence-region, egg-enter-fence-mode,
+ 	egg-fence-katakana, egg-fence-hiragana, egg-fence-hankaku,
+ 	egg-fence-zenkaku, egg-fence-backward-char,
+ 	egg-fence-forward-char, egg-fence-beginning-of-line,
+ 	egg-fence-end-of-line, egg-fence-transpose-chars,
+ 	egg-fence-delete-char, egg-fence-backward-delete-char,
+ 	egg-fence-kill-line, egg-fence-exit-mode, egg-fence-cancel-input,
+ 	egg-fence-mode-help-command): Add Prefix `egg-'.
+
+	(egg-fence-mode-map): Remove binding to eval-expression (C-z).
+
+	(egg-self-insert-non-undo-count): Removed.
+	(egg-self-insert-command): Removed.
+
+	(egg-fence-backward-char, egg-fence-forward-char,
+ 	egg-fence-transpose-chars, egg-fence-delete-char,
+ 	egg-fence-backward-delete-char): beep -> ding.
+	wnn-egg.el (egg-henkan-select-kouho): Likewise.
+
+1997-02-27  NIIBE Yutaka  <gniibe@chroot.org>
+
+	* wnn-egg.el (push-end, push-end-internal): Removed.
+
+	* its.el (dolist): Removed.  It's in CL package.
+	(for-each, for-each*): Removed.
+
+	* egg-keymap.el: Removed.  I guess noone use it.
+
+	* egg-jsymbol.el (*-alist): Declare by defconst.
+
+	* egg-misc.el (toggle-egg-mode): Removed.
+
+	* All files: Change the identifier XXX:YYYY --> XXX-YYYY,
+	and *YYY* ---> YYY.
+
+	* egg-fence.el (enter-fence-mode): Use new API for marker
+ 	insertion `set-marker-insertion-type'.
+	* its.el (its-*buff-e*): Likewise.
+
+	* egg-jsymbol.el: lc-jp --> (charset-id 'japanese-jisx0208)
+	lc-jp2 --> (charset-id 'japanese-jisx0212).
+
+1997-02-26  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
+
+	* egg-fence.el (egg:fence-mode-map): Renamed from fence-mode-map.
+	(egg:fence-mode-esc-prefix): Renamed from egg:fence-mode-esc-map.
+	(henkan-fence-region-or-single-space): Removed.
+
+	* egg-misc.el (toggle-egg-mode): mc-flag
+	 	-> enable-multibyte-characters.
+
+	* its.el (read-current-its-string): New function.  Moved from
+ 	wnn-egg-misc.el.
+	(In meny functions): beep --> ding.
+
+	* egg-misc.el (read-hiragana-string): Removed.
+	(read-kanji-string): Removed.
+	(egg:special-symbol-input): Renamed from special-symbol-input.
+	(egg:special-symbol-input-point): Renamed from
+ 	special-symbol-input-point.
+	(si:*global-map*): Remeved.
+	Removed 'Changes on Global map'.
+	(its-mode-map): Renamed from mule-keymap.
+
+	* wnn-egg.el (henkan-region-internal): Use new API for undo.
+	(henkan-kakutei): Likewise.
+	(henkan-kakutei-first-char): Likewise.
+	(henkan-kakutei-before-point): Likewise.
+	(sai-henkan): Likewise.
+	* egg.el (egg:quit-egg-mode): Likewise.
+
+	* egg-fence.el (egg:*fence-open*, egg:*fence-close*,
+ 	egg:*fence-face*): Let them be declared by defvar.
+	(egg:*fence-open-in-cont*, egg:*fence-close-in-cont*,
+ 	egg:*fence-face-in-cont*): Likewise.
+
+	(set-egg-fence-mode-format): Removed.  Useless.  Don't need to be
+ 	interactive.
+	(set-egg-fence-mode-format-in-cont): Removed.
+	(egg:*face-alist*): Removed.
+
+	* wnn-egg-misc.el (its:select-mode, its:select-mode-from-menu,
+	its:next-mode, its:previous-mode): 
+	Removed (Merged into its.el).  
+
+	* its.el (its:select-mode, its:select-mode-from-menu,
+ 	its:next-mode, its:previous-mode): Call hook of
+ 	`its:select-mode-hook'.
+
+	* diced.el: Removed.  This depends on wnn.  Functions are moved to
+	wnn-egg-dict.el.
+
+	* wnn-egg-dict.el (remove-regexp-in-string): Removed.
+	(toroku-region): Don't call `remove-regexp-in-string'.  Removing
+ 	invalid sequence (TAB?) automatically is not good idea.  It should
+ 	notify user.  Currently, just don't remove.
+
+	* busyu.el (busyu-table): defconst instead of defvar.
+	(busyu-kaku-alist): defconst instead of defvar.
+
+	* its.el (egg:member): Removed.  Not used.
+
+	* wnn-egg-msg.el (*egg-message-alist*): Include asking string in
+ 	register-notify and remove-notify.  Should also change Korean and
+ 	Chinese.
+
+	* egg.el: Removed "Tamago Notification System".
+ 	It is useless, as we have *Messages* buffer in GNU Emacs 19.
+
+	* diced.el (diced-execute): Don't use `notify' but `message'.
+	(set-dict-comment): Likewise.
+	* its.el (its-defrule**): Likewise.
+	* wnn-egg-dict.el (egg:toroku-word): Likewise.
+	* wnn-egg-msg.el (egg:error): Likewise.
+	* wnn-egg.el (set-wnn-param): Likewise.
+	(EGG:open-wnn): Likewise.
+	(close-wnn): Likewise.
+	(henkan-word-off): Likewise.
+	(henkan-inspect-bunsetu): Likewise.
+
+	* diced.el (diced-execute): Don't use `notify-yes-or-no-p' but use
+	plain `yes-or-no-p' and format.
+	* wnn-egg-dict.el (egg:toroku-word): Likewise.
+
+	* egg.el (notify-yes-or-no-p-internal): IIDESUKA is not good.
+	it should get the message through egg:get-msg.  Currently, use
+	"OK?".
+	(notify-y-or-n-p-internal): Likewise.
+
+	* wnn-egg.el: Split into wnn-egg-dict.el, wnn-egg-misc.el, and
+	wnn-egg-msg.el.
+	(many functions): remove commented out line of
+	 	(open-wnn-if-disconnected).
+
+	* egg.el: Split into egg.el, egg-fence.el, egg-misc.el,
+ 	jis-input.el, and modeline.el.
+
+	* wnn-egg.el (egg-default-startup-file): change to eggrc-wnn from
+ 	eggrc.
+	(henkan-region-internal): Use new API for marker insertion
+ 	`set-marker-insertion-type'.
+
+1997-02-13  NIIBE Yutaka  <gniibe@akebono.etl.go.jp>
+
+	* menu.el (menu:select-from-menu): Rewritten.
Index: ChangeLog.2000-2001
===================================================================
RCS file: ChangeLog.2000-2001
diff -N ChangeLog.2000-2001
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ChangeLog.2000-2001	25 Aug 2002 23:55:41 -0000	1.2
@@ -0,0 +1,371 @@
+2001-12-01  ?
+
+	* egg/wnn.el (wnn-server-info-list): Use `defvar' instead of
+	`defconst' to define it.
+
+2001-12-01  KATAYAMA Yoshio  <kate@pfu.fujitsu.com>
+
+	* egg-x0213.el: New file.
+
+2001-11-10  Kinji Itoh  <kinji-i@gray.plala.or.jp>
+	(cf. http://cgi18.plala.or.jp/nyy/canna/canna-20011023-20011110.diff)
+
+	* egg/canna.el (canna-server-port): Default to the string "canna".
+	(cannna-open): Treat the port name as a string instead of a number.
+
+2001-11-08  Kinji Itoh  <kinji-i@gray.plala.or.jp> (cf. [tamago:00546])
+
+	* egg/canna.el (canna-set-converted-yomi): New function.
+	(canna-start-conversion): Use it.
+	(canna-change-bunsetsu-length): Use it.
+
+2001-10-22  Yoichi NAKAYAMA  <yoichi@eken.phys.nagoya-u.ac.jp>
+	(cf. [tamago:00534])
+
+	* egg/canna.el (canna-word-delete-regist): Signal an error using
+	`egg-error' if there is no text for yomi.
+
+2001-08-16  KATAYAMA Yoshio  <kate@pfu.fujitsu.com> (cf. [tamago:00516])
+
+	* its/greek.el: New file.
+
+2001-07-24  KATAYAMA Yoshio  <kate@pfu.fujitsu.com> (cf. [tamago:00504])
+
+	* eggrc (wnn7-jserver-setup): New function.
+
+2001-06-28  Yoshiki Hayashi  <yoshiki@xemacs.org> (cf. [tamago:00468])
+
+	* egg-cnv.el (egg-end-of-conversion-buffer): Replace
+	`next-single-property-change' to `egg-next-single-property-change'.
+	(egg-decide-before-point): Ditto.
+	(egg-exit-conversion): Ditto.
+	(egg-abort-conversion): Ditto.
+
+	* egg.el (egg-last-method-name): Default to nil.
+
+	* its-keydef.el: Set the default value of `its-select-func-alist'
+	to nil.
+
+	* its.el (its-current-language): Default to nil.
+	(its-mode-map): Use `(meta KEY)' instead of `M-KEY'.
+
+	* egg/canna.el (canna-open): Use `binary' instead of
+	`no-conversion' for the process coding-system.
+	* egg/sj3.el (sj3-open): Ditto.
+	* egg/wnn.el (wnn-open): Ditto.
+
+	* egg/wnnrpc.el (wnnrpc-with-temp-buffer): Use `binary' instead of
+	`no-conversion'.
+	(wnnrpc-with-write-file): Ditto.
+
+2001-05-24  KATAYAMA Yoshio  <kate@pfu.fujitsu.com> (cf. [tamago:00462])
+
+	* its/aynu.el: Require `cl' when compiling.
+
+2001-05-23  Katsumi Yamaoka  <yamaoka@jpl.org> (cf. [tamago:00461])
+
+	* egg.el: Require `cl' only when compiling.
+	* its.el: Ditto.
+
+2001-05-22  KATAYAMA Yoshio <kate@pfu.fujitsu.com>
+
+	* its.el (its-delete-by-character): New customizable variable.
+	(its-delete-backward-SYL): Delete a character as a unit even if
+	just after input, if its-delete-by-character is non-NIL.
+
+2001-04-16  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* egg.el (egg-setup-invisibility-spec): New function for setup
+	buffer-invisibilty-spec.
+
+	* its.el (its-setup-fence-mode): Change the value of invisible
+	property to egg.
+
+	* egg-cnv.el (egg-convert-region): Change the value of invisible
+	property to egg.
+
+        * jisx0213.el: Correct JIS X 0213 definition. (suggested by
+        T. Kawabata)
+
+2000-06-02  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* egg/wnn.el (wnn): Fix docstring.
+	(wnn-backend-plist): Include egg-special-candidate.
+	(wnn-special-candidate): New function.
+	(wnn-pinyin-zhuyin-bunsetsu, wnn-pinyin-zhuyin-string): New
+	functions.
+	(egg-activate-wnn): Fix docstring.
+
+	* egg/sj3.el (sj3, egg-activate-sj3): Fix docstring.
+
+	* egg/canna.el (egg-activate-canna): Fix docstring.
+
+	* menudiag.el: Mostly rewritten.
+
+	* leim-list.el: Docstrings for autoload fixed.
+
+	* its.el (its): Fix docstring.
+	(its-mode-map): Fix bindings.
+	(its-fence-mode, egg-sub-mode-map-alist): New variables.
+	(its-enter/leave-fence): New function.
+	(its-put-cursor): Add text properties point-entered, point-left,
+	modification-hooks.
+	(its-in-fence-p): Check also read-only property.
+	(its-hiragana, its-katakana): Just call its-convert.
+	(its-hankaku, its-japanese-hankaku): These functions deleted.
+	(its-full-half-table, its-half-full-table): New variables.
+	Initialize them.
+	(its-half-width, its-full-width): New functions.
+	(its-convert): Args changed.
+
+	* its-keydef.el (its-make-select-func): Add check by
+	(egg-conversion-fence-p).
+
+	* egg.el (egg): Fix docstring.
+	(egg-current-keymap): This variable deleted.
+	(egg-mode-map-alist, egg-sub-mode-map-alist): New variables.
+	(define-egg-mode-map): New macro.
+	(modefull, modeless): New egg mode maps.
+	(egg-enter/leave-fence-hook): New variable.
+	(egg-enter/leave-fence): New function.
+	(egg-activated): New variable.
+	(egg-activate-keymap): New variable.
+	(egg-modify-fence, egg-post-command-func): New functions.
+	(egg-change-major-mode-buffer): New variable.
+	(egg-activate-keymap-after-command, egg-change-major-mode-func):
+	New functions.
+	(egg-mode): Initialize egg-modefull-mode, egg-modeless-mode.
+	(egg-modefull-map, egg-modeless-map): These functions deleted.
+	(egg-set-face): Preserve the current modification-hooks property.
+
+	* egg-com.el (ccl-decode-egg-binary): Fix BUFFER-MAGNIFICATION.
+	(ccl-encode-egg-binary): Likewise.
+
+	* egg-cnv.el (egg-conv): Fix docstring.
+	(egg-conversion-auto-candidate-menu): Fix docstring.
+	(egg-conversion-auto-candidate-menu-show-all): New variable.
+	(egg-conversion-sort-by-converted-string): New variable.
+	(egg-conversion-fence-p): New function.
+	(egg-define-backend-functions): Include egg-special-candidate.
+	(egg-conversion-map): Define up, down, etc.
+	(egg-conversion-mode): New variable.  Register it in
+	egg-sub-mode-map-alist.
+	(egg-conversion-enter/leave-fence): New function.  Register it in
+	egg-enter/leave-fence-hook.
+	(egg-exit-conversion-unread-char): Use single setq.
+	(egg-make-bunsetsu): Add text properties point-entered and
+	point-left.
+	(egg-set-menu-mode-in-use, egg-unset-menu-mode-in-use)
+	(egg-set-candsel-info): Args changed.
+	(egg-get-candsel-target-major): Code changed.
+	(egg-get-candsel-target-minor): Code changed.
+	(egg-insert-new-bunsetsu): Args changed.
+	(egg-candidate-select-counter): Make it buffer local.
+	(egg-next-candidate-internal): Args changed.
+	(egg-sort-item): New functions.
+	(egg-select-candidate-major): New arg SORT.
+	(egg-select-candidate-minor, egg-select-candidate-list-all-major)
+	(egg-select-candidate-list-all-minor)
+	(egg-select-candidate-internal): Likewise.
+	(egg-hiragana): New function.
+	(egg-katakana, egg-pinyin, egg-zhuyin, egg-hangul): Aliases of
+	egg-hiragana.
+	(egg-special-convert): New function.
+	(egg-enlarge-bunsetsu-internal): Code changed.
+	(egg-reconvert-bunsetsu-internal, egg-decide-before-point)
+	(egg-decide-first-char, egg-exit-conversion)
+	(egg-abort-conversion): Likewise.
+
+2000-02-01  Takanori Saneto  <sanewo@ba2.so-net.ne.jp>
+
+	* egg/sj3rpc.el (sj3rpc-tanbunsetsu-conversion): should use
+	  let* instead of let.
+
+2000-01-20  Katsumi Yamaoka <yamaoka@jpl.org>
+
+	* egg/sj3.el (sj3-word-registration): New function.
+	(sj3-hinshi-select): New function.
+	(sj3-dictionary-select): New function.
+	(sj3-conversion-backend): Add `sj3-word-registration'.
+	(sj3-hinshi-name): New function.
+	(sj3-hinshi-menu): New variable.
+	(sj3-register-2, sj3-register-1): Add messages.
+	(sj3-server-coding-system-list): Remove.
+	(sj3-server-version): Move to egg/sj3rpc.el.
+	(sj3-server-port, sj3-hostname): Strip "*" from the doc string.
+
+	* egg/sj3rpc.el (sj3rpc-add-word): New function.
+	(sj3rpc-kugiri-stdy, sj3rpc-get-bunsetsu-candidates): Use
+	`sj3-server-coding-system' insted of `sj3rpc-server-coding-system'.
+	(sj3rpc-tanbunsetsu-conversion, sj3rpc-get-bunsetsu-candidates-sub,
+	sj3rpc-begin): Use `sj3-server-coding-system' insted of
+	`sj3rpc-server-coding-system'; don't specify an argument of
+	`sj3rpc-unpack-mb-string'.
+	(sj3rpc-unpack-mb-string): Don't allow the argument; use
+	`sj3rpc-server-coding-system'.
+	(sj3rpc-server-coding-system): Remove macro.
+	(sj3-const): Switch on the return value of `sj3-sjis-p' instead of
+	`sj3-server-version'.
+	(sj3-sjis-p): New macro.
+	(sj3-server-coding-system): New variable; default to `shift_jis'.
+	(sj3-server-version): Move from egg/sj3.el; use `defvar' insted of
+	`defcustom'.
+
+	* eggrc: Remove SJ3 stuff.
+
+2000-01-17  TOMURA Satoru <tomura@etl.go.jp>
+
+	* Version 4.0.6 released
+	
+2000-01-17  TOMURA Satoru <tomura@etl.go.jp>
+
+	* README.ja.text: mentiond about doc/lc99.text
+	
+2000-01-17  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* its.el (its-hiragana, its-katanaka): modified
+	(its-zenkaku, its-hankaku): added
+	(its-put-cursor): bug fixed.
+	(its-set-cursor-status): redefined.
+	(its-search-beginning, its-search-end): created.
+	(its-end-of-input-buffer): modified.
+	(its-kill-line): modified.
+	(its-cancel-input): modified.
+	(its-japanese-hankaku): added.
+	(its-convert): added.
+	* egg.el (egg-redraw-face): bug fixed.
+	
+2000-01-17  SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
+	
+	* its.el (its-hiragana, its-katakana): re-added.
+	
+2000-01-17  SANETO Takanori <sanewo@ba2.so-net.ne.jp>
+
+	* Makefile.in: move its-keydefs.el from ITSELS to TOPELS
+	
+2000-01-16
+	
+	* egg-sim.el: many functions renamed and modified...
+	* doc/code-table: created
+	
+2000-01-15  TOMURA Satoru <tomura@etl.go.jp>
+	
+	* egg-sim.el: rename egg-code.el as egg-sim.el
+	* egg-sim.el (egg-simple-input-method): rename
+	egg-insert-character as egg-simple-input-method
+	* egg.el: rename egg-insert-character as egg-simple-input-method
+	* doc/lc99.txt: added.
+	
+2000-01-14  TOMURA Satoru <tomura@etl.go.jp>
+	* egg-code.el: created
+	* egg.el: Bind egg-insert-character to C-^ in egg-mode
+	* egg.el: Delete the binding for C-_ in egg-mode
+	* Makefile.in: add egg-code to ${SRCS}
+	
+2000-01-13  TOMURA Satoru <tomura@etl.go.jp>
+	
+	* Version 4.0.5 released.
+
+2000-01-13  Katsumi Yamaoka <yamaoka@jpl.org>
+	
+	* egg/sj3.el (sj3-end-conversion): Restrain from overrunning.
+	
+2000-01-13  Katsumi Yamaoka <yamaoka@jpl.org>
+	* egg/sj3rpc.el (sj3rpc-open): Use `sj3-server-version' instead of
+	2.
+	(sj3rpc-unpack-mb-string): New macro.
+	(sj3rpc-tanbunsetsu-conversion, sj3rpc-get-bunsetsu-candidates-sub,
+	sj3rpc-begin): Use it instead of `comm-unpack'.
+
+	(sj3rpc-server-coding-system): New macro.
+	(sj3rpc-kugiri-stdy, sj3rpc-tanbunsetsu-conversion,
+	sj3rpc-get-bunsetsu-candidates, sj3rpc-get-bunsetsu-candidates-sub,
+	sj3rpc-begin, sj3rpc-unpack-mb-string): Use it.
+
+	(sj3-const): Switch on the value of `sj3-server-version'.
+	(sj3rpc-kugiri-stdy, sj3rpc-tanbunsetsu-conversion,
+	sj3rpc-get-bunsetsu-candidates, sj3rpc-get-bunsetsu-candidates-sub,
+	sj3rpc-begin): Modify for it.
+
+	* egg/sj3.el (sj3-server-coding-system-list): New user option.
+	(sj3-server-version): Ditto.
+
+2000-01-13  SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
+
+	* its.el: typo
+	* egg.el: typo
+	
+2000-01-13  KATAYAMA Yoshio <kate@pfu.co.jp>
+
+	* its.el(its-hiragana, its-katakana): does not work. so deleted.
+	
+2000-01-12  NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp>	
+
+	* README.ja.txt: typo
+	* Makefile.in: (clean, distclean): modified.
+
+2000-01-12  TOMURA Satoru <tomura@etl.go.jp>
+	
+	* Version 4.0.4 released.
+	
+2000-01-12  TOMURA Satoru <tomura@etl.go.jp>
+
+	* REAMDE: removed.
+	
+	* README.ja.txt: created.
+	
+2000-01-12  SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
+
+	* Makefile.in: "clean" removes ${ELCS}.
+	
+	* Makefile.in: "distclean" created.
+	
+2000-01-12  Satoru Tomura  <tomura@etl.go.jp>
+
+	* Version 4.0.3 released.
+	
+2000-01-12  Satoru Tomura  <tomura@etl.go.jp>
+
+	* install-sh: copied from automake distribution
+
+	* configure.in: created
+
+	* Makefile.in: created
+
+	* configure: generated by autoconf
+	
+2000-01-11  Satoru Tomura  <tomura@etl.go.jp>
+
+	* leim-list.el: (defgroup sj3) added.
+
+	* egg/sj3.el (sj3-hosname, sj3-server-port): defcusotm'ed
+
+2000-01-11  Katsumi Yamaoka <yamaoka@jpl.org>
+
+	* egg/sj3.el : (require 'egg) added.
+
+2000-01-11  SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
+	
+	* its.el (its-hiragana, its-katakana): New functions
+	
+2000-01-07  Tomura Satoru   <tomura@etl.go.jp>
+	
+	* COPYING: The file is added.
+	
+	* ChangeLog.1: The original ChangeLog is renamed as.
+	
+	* ChangeLog: Created.
+	
+2000-01-07  Tomura Satoru   <tomura@etl.go.jp>
+	
+	* Version 4.0.2 released.
+	
+2000-01-06  Tomura Satoru   <tomura@etl.go.jp>
+	
+	* Version 4.0.1 released.
+	
+2000-01-05  Tomura Satoru   <tomura@etl.go.jp>
+	
+	* Version 4.0.0 released.
+	
+
Index: Makefile.in
===================================================================
RCS file: /cvs/tamago/tamago/Makefile.in,v
retrieving revision 1.1.1.4
retrieving revision 1.6
diff -d -u -p -r1.1.1.4 -r1.6
--- Makefile.in	27 Jan 2001 18:46:59 -0000	1.1.1.4
+++ Makefile.in	9 Sep 2002 08:50:42 -0000	1.6
@@ -8,6 +8,10 @@
 .SUFFIXES:
 SHELL	= @SHELL@
 
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
 #------------------------------------------------
 #  Configuration parameters
 #------------------------------------------------
@@ -31,7 +35,7 @@ INSTALL_INFO = install-info
 #       ;; install files into the emacs site-lisp directory
 #       ;; ex. /usr/local/share/emacs/site-lisp/egg
 
-DEPS	= -l ./docomp.el
+DEPS	= -l $(top_srcdir)/docomp.el
 BATCHFLAGS	= -batch -q -no-site-file -no-init-file
 
 ETCS	= Makefile docomp.el \
@@ -46,7 +50,6 @@ TOPSRCS	= \
 	egg-edep.el \
 	egg-com.el \
 	egg-cnv.el \
-	egg-util.el \
 	egg-mlh.el \
 	egg-sim.el \
 	menudiag.el \
@@ -58,12 +61,16 @@ EGGSRCS	= \
 	egg/cannarpc.el egg/canna.el \
 	egg/sj3rpc.el egg/sj3.el \
 	egg/wnnrpc.el egg/wnn.el \
+	egg/anthyipc.el egg/anthy.el
 
 #
+AYNU	= @HAVE_JISX0213@ its/aynu.el
+
 ITSSRCS	= \
 	its/ascii.el \
 	its/bixing.el \
 	its/erpin.el \
+	its/greek.el \
 	its/hankata.el \
 	its/hira.el \
 	its/jeonkak.el \
@@ -74,6 +81,7 @@ ITSSRCS	= \
 	its/quanjiao.el \
 	its/zenkaku.el \
 	its/zhuyin.el \
+	${AYNU}
 
 #
 ELCS	= ${SRCS:.el=.elc}
@@ -86,6 +94,7 @@ ITSELCS	= ${ITSSRCS:.el=.elc}
 
 DIST	= ${ETCS} ${SRCS} ${INITELS}
 
+
 all: ${ELCS}
 
 .SUFFIXES: .el .elc
@@ -138,9 +147,7 @@ uninstall-site:
 egg/sj3rpc.elc: egg-com.elc egg/sj3.elc
 egg/wnnrpc.elc: egg-com.elc egg/wnn.elc
 
-egg.elc its/ascii.elc its/erpin.elc its/hankata.elc \
-its/hira.elc its/jeonkak.elc its/pinyin.elc \
+egg.elc its/ascii.elc its/aynu.elc its/erpin.elc its/greek.elc \
+its/hankata.elc its/hira.elc its/jeonkak.elc its/pinyin.elc \
 its/hangul.elc its/kata.elc its/quanjiao.elc \
 its/zenkaku.elc its/zhuyin.elc: its-keydef.elc
-
-
Index: check-jisx0213.el
===================================================================
RCS file: check-jisx0213.el
diff -N check-jisx0213.el
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ check-jisx0213.el	9 Sep 2002 08:50:42 -0000	1.1
@@ -0,0 +1,3 @@
+(if (charsetp 'japanese-jisx0213-1)
+    (kill-emacs 0)
+  (kill-emacs 1))
Index: configure
===================================================================
RCS file: /cvs/tamago/tamago/configure,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -d -u -p -r1.1.1.1 -r1.2
--- configure	27 Jan 2001 18:46:16 -0000	1.1.1.1
+++ configure	9 Sep 2002 08:50:42 -0000	1.2
@@ -637,6 +637,15 @@ fi
 
 
 
+echo $ac_n "checking jisx0213""... $ac_c" 1>&6
+echo "configure:642: checking jisx0213" >&5
+if emacs -batch -q -no-site-file -no-init-file -l ${srcdir}/check-jisx0213.el; then
+  echo "yes"; HAVE_JISX0213=""
+else
+  echo "no"; HAVE_JISX0213="# "
+fi
+
+
 lispdir=${datadir}/emacs/site-lisp
 
 trap '' 1 2 15
@@ -788,6 +797,7 @@ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
 s%@SET_MAKE@%$SET_MAKE%g
+s%@HAVE_JISX0213@%$HAVE_JISX0213%g
 s%@lispdir@%$lispdir%g
 
 CEOF
Index: configure.in
===================================================================
RCS file: /cvs/tamago/tamago/configure.in,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -d -u -p -r1.1.1.1 -r1.2
--- configure.in	27 Jan 2001 18:46:16 -0000	1.1.1.1
+++ configure.in	9 Sep 2002 08:50:42 -0000	1.2
@@ -13,6 +13,15 @@ dnl Checks for typedefs, structures, and
 
 dnl Checks for library functions.
 
+dnl check if jisx0213 is supported or not
+AC_MSG_CHECKING(jisx0213)
+if emacs -batch -q -no-site-file -no-init-file -l ${srcdir}/check-jisx0213.el; then
+  echo "yes"; HAVE_JISX0213=""
+else
+  echo "no"; HAVE_JISX0213="# "
+fi
+AC_SUBST(HAVE_JISX0213)
+
 lispdir=${datadir}/emacs/site-lisp
 AC_SUBST(lispdir)
 AC_OUTPUT(Makefile)
Index: egg-cnv.el
===================================================================
RCS file: /cvs/tamago/tamago/egg-cnv.el,v
retrieving revision 1.1.1.2
retrieving revision 1.4
diff -d -u -p -r1.1.1.2 -r1.4
--- egg-cnv.el	27 Jan 2001 18:46:16 -0000	1.1.1.2
+++ egg-cnv.el	22 Jul 2002 13:18:56 -0000	1.4
@@ -34,19 +34,29 @@
 (require 'egg-edep)
 
 (defgroup egg-conv nil
-  "Conversion backend Interface of Tamagotchy"
+  "Conversion Backend Interface of Tamago 4."
   :group 'egg)
 
-(defcustom egg-conversion-wrap-select nil
+(defcustom egg-conversion-wrap-select t
   "*Candidate selection wraps around to first candidate, if non-NIL.
 Otherwise stop at the last candidate."
   :group 'egg-conv :type 'boolean)
 
 (defcustom egg-conversion-auto-candidate-menu 0
-  "*Automatically enter the candidate selectionmenu mode at N times
+  "*Automatically enter the candidate selection mode at N times
 next/previous-candidate, if positive number N."
   :group 'egg-conv :type 'integer)
 
+(defcustom egg-conversion-auto-candidate-menu-show-all nil
+  "*Enter show all candiate mode when automatic candidate selection
+mode, if non-NIL."
+  :group 'egg-conv :type 'boolean)
+
+(defcustom egg-conversion-sort-by-converted-string nil
+  "*Sort candidate list by converted string on candidate selection
+mode, if non-NIL."
+  :group 'egg-conv :type 'boolean)
+
 (defcustom egg-conversion-fence-invisible nil
   "*Make fence marks invisible, if non-NIL."
   :group 'egg-conv :type 'boolean)
@@ -147,7 +157,7 @@ next/previous-candidate, if positive num
 	    pair (assq lang egg-conversion-backend-alist))
       (cond
        ((null pair)
-	(setq egg-conversion-backend-alist 
+	(setq egg-conversion-backend-alist
 	      (cons (cons lang backend-set) egg-conversion-backend-alist)))
        (force
 	(setcdr pair backend-set))))))
@@ -207,6 +217,10 @@ next/previous-candidate, if positive num
 (defsubst egg-bunsetsu-set-info (bunsetsu info)
   (setcdr bunsetsu info))
 
+(defun egg-conversion-fence-p ()
+  (and (egg-get-backend (point))
+       (get-text-property (point) 'read-only)))
+
 (defvar egg-finalize-backend-list nil)
 
 (defun egg-set-finalize-backend (func-list)
@@ -243,8 +257,9 @@ next/previous-candidate, if positive num
   (egg-major-bunsetsu-continue-p (bunsetsu))
   (egg-list-candidates (bunsetsu-list prev-b next-b major))
   (egg-decide-candidate (bunsetsu-list candidate-pos prev-b next-b))
+  (egg-special-candidate (bunsetsu-list prev-b next-b major type))
   (egg-change-bunsetsu-length (bunsetsu-list prev-b next-b length major))
-  (egg-bunsetsu-combinable-p (bunsetsu next-b)) 
+  (egg-bunsetsu-combinable-p (bunsetsu next-b))
   (egg-end-conversion (bunsetsu-list abort))
   (egg-word-inspection (bunsetsu))
   (egg-word-registration (backend source converted))))
@@ -263,7 +278,7 @@ next/previous-candidate, if positive num
 (defun egg-start-conversion-noconv (backend yomi-string context)
   (let ((string (copy-sequence yomi-string))
 	(language (egg-get-language 0 yomi-string)))
-    (set-text-properties 0 (length string) nil string)
+    (egg-remove-all-text-properties 0 (length string) string)
     (list (egg-bunsetsu-create backend (vector string language)))))
 
 (defun egg-get-bunsetsu-source-noconv (bunsetsu)
@@ -288,6 +303,7 @@ next/previous-candidate, if positive num
 	;; nothing to do
 	nil
       (delete-region start end)
+      (egg-setup-invisibility-spec)
       (let ((inhibit-read-only t))
 	(its-define-select-keys egg-conversion-map)
 	(goto-char start)
@@ -302,13 +318,13 @@ next/previous-candidate, if positive num
 	(if context
 	    (put-text-property 0 len 'egg-context context s))
 	(if egg-conversion-fence-invisible
-	    (put-text-property 0 len 'invisible t s))
+	    (put-text-property 0 len 'invisible 'egg s))
 	(insert s)
 	(setq s (copy-sequence egg-conversion-fence-close)
 	      len (length s))
 	(set-text-properties 0 len '(read-only t rear-nonsticky t egg-end t) s)
 	(if egg-conversion-fence-invisible
-	    (put-text-property 0 len 'invisible t s))
+	    (put-text-property 0 len 'invisible 'egg s))
 	(insert s)
 	(goto-char start)
 	(insert source)
@@ -429,7 +445,8 @@ next/previous-candidate, if positive num
 	  (setq last-chinese lang))
       (setq j i
 	    i (egg-next-single-property-change i 'egg-lang str len))
-      (set-text-properties j i (list 'egg-lang lang) str))))
+      (egg-remove-all-text-properties j i str)
+      (put-text-property j i 'egg-lang lang str))))
 
 ;;; Should think again the interface to language-info-alist
 (defun egg-charset-to-language (charset)
@@ -478,7 +495,8 @@ next/previous-candidate, if positive num
 	    s (substring source i j)
 	    lang (egg-get-language 0 s)
 	    backend (egg-get-conversion-backend lang n t))
-      (set-text-properties 0 (- j i) (list 'egg-lang lang) s)
+      (egg-remove-all-text-properties 0 (- j i) s)
+      (put-text-property 0 (- j i) 'egg-lang lang s)
       (setq retval (nconc retval (list (list backend (list lang) s)))
 	    i j))
     (prog1
@@ -499,7 +517,7 @@ next/previous-candidate, if positive num
 	      file (and (file-readable-p file) file))
       (while (and (null file) path)
 	(if (stringp (car path))
-	    (setq file (substitute-in-file-name 
+	    (setq file (substitute-in-file-name
 			(expand-file-name filename (car path)))
 		  file (and (file-exists-p file) file)))
 	(setq path (cdr path)))
@@ -536,53 +554,72 @@ next/previous-candidate, if positive num
     (while (< i 127)
       (define-key map (vector i) 'egg-exit-conversion-unread-char)
       (setq i (1+ i)))
-    (define-key map "\C-@"   'egg-decide-first-char)
-    (define-key map [?\C-\ ] 'egg-decide-first-char)
-    (define-key map "\C-a"   'egg-beginning-of-conversion-buffer)
-    (define-key map "\C-b"   'egg-backward-bunsetsu)
-    (define-key map "\C-c"   'egg-abort-conversion)
-    (define-key map "\C-e"   'egg-end-of-conversion-buffer)
-    (define-key map "\C-f"   'egg-forward-bunsetsu)
-    (define-key map "\C-h"   'egg-help-command)
-    (define-key map "\C-i"   'egg-shrink-bunsetsu-major)
-    (define-key map "\C-k"   'egg-decide-before-point)
-;;    (define-key map "\C-l"   'egg-exit-conversion)  ; Don't override C-L
-    (define-key map "\C-m"   'egg-exit-conversion)
-    (define-key map "\C-n"   'egg-next-candidate-major)
-    (define-key map "\C-o"   'egg-enlarge-bunsetsu-major)
-    (define-key map "\C-p"   'egg-previous-candidate-major)
-    (define-key map "\C-r"   'egg-reconvert-bunsetsu)
-    (define-key map "\C-t"   'egg-toroku-bunsetsu)
-    (define-key map "\C-v"   'egg-inspect-bunsetsu)
-    (define-key map "\M-i"   'egg-shrink-bunsetsu-minor)
-    (define-key map "\M-n"   'egg-next-candidate-minor)
-    (define-key map "\M-o"   'egg-enlarge-bunsetsu-minor)
-    (define-key map "\M-p"   'egg-previous-candidate-minor)
-    (define-key map "\M-r"   'egg-reconvert-bunsetsu-from-source)
-    (define-key map "\M-s"   'egg-select-candidate-major)
-    (define-key map "\M-v"   'egg-toggle-inspect-mode)
-    (define-key map "\M-z"   'egg-select-candidate-minor)
-    (define-key map "\e\C-s" 'egg-select-candidate-list-all-major)
-    (define-key map "\e\C-z" 'egg-select-candidate-list-all-minor)
-    (define-key map [return] 'egg-exit-conversion)
-    (define-key map [right]  'egg-forward-bunsetsu)
-    (define-key map [left]   'egg-backward-bunsetsu)
-    (define-key map " "      'egg-next-candidate)
-    (define-key map "/"      'egg-exit-conversion)
-    ;;;(define-key map "\M-h"   'egg-hiragana)
-    ;;;(define-key map "\M-k"   'egg-katakana)
-    ;;;(define-key map "\M-<"   'egg-hankaku)
-    ;;;(define-key map "\M->"   'egg-zenkaku)
+    (define-key map "\C-@"      'egg-decide-first-char)
+    (define-key map [?\C-\ ]    'egg-decide-first-char)
+    (define-key map "\C-a"      'egg-beginning-of-conversion-buffer)
+    (define-key map "\C-b"      'egg-backward-bunsetsu)
+    (define-key map "\C-c"      'egg-abort-conversion)
+    (define-key map "\C-e"      'egg-end-of-conversion-buffer)
+    (define-key map "\C-f"      'egg-forward-bunsetsu)
+    (define-key map "\C-h"      'egg-help-command)
+    (define-key map "\C-i"      'egg-shrink-bunsetsu-major)
+    (define-key map "\C-k"      'egg-decide-before-point)
+;;    (define-key map "\C-l"      'egg-exit-conversion)  ; Don't override C-L
+    (define-key map "\C-m"      'egg-exit-conversion)
+    (define-key map "\C-n"      'egg-next-candidate-major)
+    (define-key map "\C-o"      'egg-enlarge-bunsetsu-major)
+    (define-key map "\C-p"      'egg-previous-candidate-major)
+    (define-key map "\C-r"      'egg-reconvert-bunsetsu)
+    (define-key map "\C-t"      'egg-toroku-bunsetsu)
+    (define-key map "\C-v"      'egg-inspect-bunsetsu)
+    (define-key map "\M-i"      'egg-shrink-bunsetsu-minor)
+    (define-key map "\M-n"      'egg-next-candidate-minor)
+    (define-key map "\M-o"      'egg-enlarge-bunsetsu-minor)
+    (define-key map "\M-p"      'egg-previous-candidate-minor)
+    (define-key map "\M-r"      'egg-reconvert-bunsetsu-from-source)
+    (define-key map "\M-s"      'egg-select-candidate-major)
+    (define-key map "\M-v"      'egg-toggle-inspect-mode)
+    (define-key map "\M-z"      'egg-select-candidate-minor)
+    (define-key map "\e\C-s"    'egg-select-candidate-list-all-major)
+    (define-key map "\e\C-z"    'egg-select-candidate-list-all-minor)
+    (define-key map [return]    'egg-exit-conversion)
+    (define-key map [right]     'egg-forward-bunsetsu)
+    (define-key map [left]      'egg-backward-bunsetsu)
+    (define-key map [up]        'egg-previous-candidate)
+    (define-key map [down]      'egg-next-candidate)
+    (define-key map [backspace] 'egg-abort-conversion)
+    (define-key map [clear]     'egg-abort-conversion)
+    (define-key map [delete]    'egg-abort-conversion)
+    (define-key map " "         'egg-next-candidate)
+    (define-key map "/"         'egg-exit-conversion)
+    (define-key map "\M-h"      'egg-hiragana)
+    (define-key map "\M-k"      'egg-katakana)
+    (define-key map "\M-P"      'egg-pinyin)
+    (define-key map "\M-Z"      'egg-zhuyin)
+    (define-key map "\M-H"      'egg-hangul)
     map)
   "Keymap for EGG Conversion mode.")
-
 (fset 'egg-conversion-map egg-conversion-map)
 
+(defvar egg-conversion-mode nil)
+(make-variable-buffer-local 'egg-conversion-mode)
+(put 'egg-conversion-mode 'permanent-local t)
+
+(or (assq 'egg-conversion-mode egg-sub-mode-map-alist)
+    (setq egg-sub-mode-map-alist (cons
+				  '(egg-conversion-mode . egg-conversion-map)
+				  egg-sub-mode-map-alist)))
+
+(defun egg-conversion-enter/leave-fence (&optional old new)
+  (setq egg-conversion-mode (egg-conversion-fence-p)))
+
+(add-hook 'egg-enter/leave-fence-hook 'egg-conversion-enter/leave-fence)
+
 (defun egg-exit-conversion-unread-char ()
   (interactive)
-  (setq unread-command-events (list last-command-event)
-	this-command 'egg-use-context)
-  (setq egg-context (egg-exit-conversion)))
+  (setq egg-context (egg-exit-conversion)
+        unread-command-events (list last-command-event)
+	this-command 'egg-use-context))
 
 (defun egg-make-bunsetsu (backend bunsetsu last)
   (let* ((converted (copy-sequence (egg-get-bunsetsu-converted bunsetsu)))
@@ -597,27 +634,30 @@ next/previous-candidate, if positive num
 				    egg-conversion-minor-separator
 				  egg-conversion-major-separator))))
     (setq len (length converted))
-    (set-text-properties 0 len
+    (egg-remove-all-text-properties 0 len converted)
+    (add-text-properties 0 len
 			 (list 'read-only          t
 			       (egg-bunsetsu-info) bunsetsu
 			       'egg-backend        backend
 			       'egg-lang           language
 			       'egg-bunsetsu-last  last
 			       'egg-major-continue continue
-			       'local-map          'egg-conversion-map)
+			       'point-entered      'egg-enter/leave-fence
+			       'point-left         'egg-enter/leave-fence
+			       'modification-hooks '(egg-modify-fence))
 			 converted)
     (if face
 	(egg-set-face 0 len1 face converted))
     converted))
 
-(defun egg-insert-bunsetsu-list (backend bunsetsu-list &optional last)
+(defun egg-insert-bunsetsu-list (backend bunsetsu-list &optional last before)
   (let ((len (length bunsetsu-list)))
-    (insert
-     (mapconcat
-      (lambda (b)
-	(setq len (1- len))
-	(egg-make-bunsetsu backend b (and (= len 0) last)))
-      bunsetsu-list ""))))
+    (funcall (if before 'insert-before-markers 'insert)
+	     (mapconcat
+	      (lambda (b)
+		(setq len (1- len))
+		(egg-make-bunsetsu backend b (and (= len 0) last)))
+	      bunsetsu-list nil))))
 
 (defun egg-beginning-of-conversion-buffer (n)
   (interactive "p")
@@ -627,13 +667,13 @@ next/previous-candidate, if positive num
    ((null (get-text-property (1- (point)) 'egg-start))
     (goto-char (previous-single-property-change (point) 'egg-start)))))
 
-(defun egg-end-of-conversion-buffer(n)
+(defun egg-end-of-conversion-buffer (n)
   (interactive "p")
   (cond
    ((<= n 0)
     (egg-beginning-of-conversion-buffer 1))
    (t
-    (goto-char (next-single-property-change (point) 'egg-end))
+    (goto-char (egg-next-single-property-change (point) 'egg-end))
     (backward-char))))
 
 (defun egg-backward-bunsetsu (n)
@@ -677,8 +717,7 @@ next/previous-candidate, if positive num
        (egg-get-bunsetsu-info (1- p))))
 
 (defun egg-get-previous-major-bunsetsu (p)
-  (let ((p (point))
-	(prev (egg-get-previous-bunsetsu p))
+  (let ((prev (egg-get-previous-bunsetsu p))
 	bunsetsu)
     (while prev
       (setq bunsetsu (cons prev bunsetsu)
@@ -702,7 +741,10 @@ next/previous-candidate, if positive num
     (nreverse bunsetsu)))
 
 (defsubst egg-get-major-bunsetsu-source (list)
-  (mapconcat (lambda (b) (egg-get-bunsetsu-source b)) list ""))
+  (mapconcat 'egg-get-bunsetsu-source list nil))
+
+(defsubst egg-get-major-bunsetsu-converted (list)
+  (mapconcat 'egg-get-bunsetsu-converted list nil))
 
 (defvar egg-inspect-mode nil
   "*Display clause information on candidate selection, if non-NIL.")
@@ -724,8 +766,8 @@ next/previous-candidate, if positive num
 (defvar egg-candidate-selection-major t)
 (make-variable-buffer-local 'egg-candidate-selection-major)
 
-(defsubst egg-set-candsel-info (b prev-b next-b major)
-  (setq egg-candidate-selection-info (list b prev-b next-b major)))
+(defsubst egg-set-candsel-info (b major)
+  (setq egg-candidate-selection-info (list (car b) (cadr b) (caddr b) major)))
 
 (defsubst egg-candsel-last-bunsetsu () (car egg-candidate-selection-info))
 (defsubst egg-candsel-last-prev-b () (nth 1 egg-candidate-selection-info))
@@ -744,9 +786,8 @@ next/previous-candidate, if positive num
 
 (defun egg-get-candsel-target-major ()
   (let ((bunsetsu (egg-get-major-bunsetsu (point)))
-	next-b prev-b next)
-    (setq prev-b (egg-get-previous-major-bunsetsu (point))
-	  next (egg-next-bunsetsu-point (point) (length bunsetsu)))
+	(prev-b (egg-get-previous-major-bunsetsu (point)))
+	next-b)
     (cond
      ((and (egg-candsel-last-major)
 	   (egg-major-bunsetsu-tail-p (egg-candsel-last-prev-b) prev-b)
@@ -755,31 +796,63 @@ next/previous-candidate, if positive num
 				      bunsetsu))
       (setq bunsetsu (egg-candsel-last-bunsetsu)
 	    prev-b (egg-candsel-last-prev-b)
-	    next-b (egg-candsel-last-next-b))
-      (setq next (egg-next-bunsetsu-point (point) (length bunsetsu))))
-     ((null (egg-get-bunsetsu-last (1- next)))
-      (setq next-b (egg-get-major-bunsetsu next))))
+	    next-b (egg-candsel-last-next-b)))
+     ((null (egg-get-bunsetsu-last
+	     (egg-next-bunsetsu-point (point) (1- (length bunsetsu)))))
+      (setq next-b (egg-get-major-bunsetsu
+		    (egg-next-bunsetsu-point (point) (length bunsetsu))))))
     (setq egg-candidate-selection-major t)
-    (list bunsetsu prev-b next-b next t)))
+    (list bunsetsu prev-b next-b t)))
 
 (defun egg-get-candsel-target-minor ()
   (let* ((bunsetsu (list (egg-get-bunsetsu-info (point))))
 	 (prev-b (egg-get-previous-bunsetsu (point)))
 	 (next-b (egg-get-next-bunsetsu (point))))
-    (and prev-b (setq prev-b (list prev-b)))
-    (and next-b (setq next-b (list next-b)))
     (setq egg-candidate-selection-major nil)
-    (list bunsetsu prev-b next-b (egg-next-bunsetsu-point (point)) nil)))
+    (list bunsetsu (and prev-b (list prev-b)) (and next-b (list next-b)) nil)))
 
-(defun egg-insert-new-bunsetsu (b prev-b next-b next end)
-  (let ((backend (egg-get-backend (point)))
-	start last)
-    (setq start (egg-previous-bunsetsu-point (point) (length prev-b)))
-    (setq end (or end (egg-next-bunsetsu-point next (length next-b))))
-    (setq last (egg-get-bunsetsu-last (1- end)))
-    (delete-region start end)
-    (egg-insert-bunsetsu-list backend (append prev-b (append b next-b)) last)
-    (goto-char (egg-next-bunsetsu-point start (length prev-b)))
+(defun egg-check-candsel-target (b prev-b next-b major)
+  (if major
+      (and (egg-major-bunsetsu-tail-p
+	    prev-b (egg-get-previous-major-bunsetsu (point)))
+	   (let* ((cur-b (egg-get-major-bunsetsu (point)))
+		  (next-p (egg-next-bunsetsu-point (point) (length cur-b))))
+	     (egg-major-bunsetsu-head-p
+	      (append b next-b)
+	      (append cur-b (and (null (egg-get-bunsetsu-last (1- next-p)))
+				 (egg-get-major-bunsetsu next-p))))))
+    (and (eq (egg-get-bunsetsu-info (point)) (car b))
+	 (eq (egg-get-previous-bunsetsu (point)) (car prev-b))
+	 (eq (egg-get-next-bunsetsu (point)) (car next-b)))))
+
+(defun egg-insert-new-bunsetsu (b tail new-b)
+  (let* ((backend (egg-get-backend (point)))
+	 (start (egg-previous-bunsetsu-point (point) (length (cadr new-b))))
+	 (end (egg-next-bunsetsu-point (point) (+ (length b) (length tail))))
+	 (last (egg-get-bunsetsu-last (1- end)))
+	 (insert-before (buffer-has-markers-at end)))
+    (cond
+     ((buffer-has-markers-at end)
+      (delete-region start end)
+      (egg-insert-bunsetsu-list backend
+				(append (cadr new-b) (car new-b) (caddr new-b))
+				last t))
+     ((buffer-has-markers-at (egg-next-bunsetsu-point (point) (length b)))
+      (delete-region start end)
+      (egg-insert-bunsetsu-list backend (append (cadr new-b) (car new-b))
+				nil t)
+      (egg-insert-bunsetsu-list backend (caddr new-b) last))
+     ((buffer-has-markers-at (point))
+      (delete-region start end)
+      (egg-insert-bunsetsu-list backend (cadr new-b) nil t)
+      (egg-insert-bunsetsu-list backend (append (car new-b) (caddr new-b))
+				last))
+     (t
+      (delete-region start end)
+      (egg-insert-bunsetsu-list backend
+				(append (cadr new-b) (car new-b) (caddr new-b))
+				last)))
+    (goto-char (egg-next-bunsetsu-point start (length (cadr new-b))))
     (if egg-inspect-mode
 	(egg-inspect-bunsetsu t))))
 
@@ -812,16 +885,19 @@ next/previous-candidate, if positive num
   (apply 'egg-next-candidate-internal (- n) (egg-get-candsel-target-minor)))
 
 (defvar egg-candidate-select-counter 1)
+(make-variable-buffer-local 'egg-candidate-select-counter)
 
-(defun egg-next-candidate-internal (n b prev-b next-b next major)
+(defun egg-next-candidate-internal (n b prev-b next-b major)
   (if (eq last-command (if major 'egg-candidate-major 'egg-candidate-minor))
       (setq egg-candidate-select-counter (1+ egg-candidate-select-counter))
     (setq egg-candidate-select-counter 1))
   (if (= egg-candidate-select-counter egg-conversion-auto-candidate-menu)
-      (egg-select-candidate-internal nil b prev-b next-b next major)
+      (egg-select-candidate-internal
+       nil egg-conversion-auto-candidate-menu-show-all
+       b prev-b next-b major)
     (setq this-command (if major 'egg-candidate-major 'egg-candidate-minor))
     (let ((inhibit-read-only t)
-	  candidates nitem i beep)
+	  new-b candidates nitem i beep)
       (setq candidates (egg-list-candidates b prev-b next-b major))
       (if (null candidates)
 	  (setq beep t)
@@ -829,21 +905,18 @@ next/previous-candidate, if positive num
 	      nitem (length (cdr candidates)))
 	(cond
 	 ((< i 0)			; go backward as if it is ring
-	  (while (< i 0)
-	    (setq i (+ i nitem))))
+	  (setq i (% i nitem))
+	  (if (< i 0)
+	      (setq i (+ i nitem))))
 	 ((< i nitem))			; OK
 	 (egg-conversion-wrap-select	; go backward as if it is ring
-	  (while (>= i nitem)
-	    (setq i (- i nitem))))
-	 (t				; don't go forward 
+	  (setq i (% i nitem)))
+	 (t				; don't go forward
 	  (setq i (1- nitem)
 		beep t)))
-	(setq b (egg-decide-candidate b i prev-b next-b)
-	      prev-b (nth 1 b)
-	      next-b (nth 2 b)
-	      b (car b))
-	(egg-set-candsel-info b prev-b next-b major)
-	(egg-insert-new-bunsetsu b prev-b next-b next nil))
+	(setq new-b (egg-decide-candidate b i prev-b next-b))
+	(egg-set-candsel-info new-b major)
+	(egg-insert-new-bunsetsu b (caddr new-b) new-b))
       (if beep
 	  (ding)))))
 
@@ -851,39 +924,65 @@ next/previous-candidate, if positive num
   (let ((n -1))
     (mapcar (lambda (item) (cons item (setq n (1+ n)))) list)))
 
-(defun egg-select-candidate-major ()
-  (interactive)
-  (apply 'egg-select-candidate-internal nil (egg-get-candsel-target-major)))
+(defun egg-sort-item (list sort)
+  (if (eq (null sort) (null egg-conversion-sort-by-converted-string))
+      list
+    (sort list (lambda (a b) (string< (car a) (car b))))))
 
-(defun egg-select-candidate-minor ()
-  (interactive)
-  (apply 'egg-select-candidate-internal nil (egg-get-candsel-target-minor)))
+(defun egg-select-candidate-major (sort)
+  (interactive "P")
+  (apply 'egg-select-candidate-internal sort nil (egg-get-candsel-target-major)))
 
-(defun egg-select-candidate-list-all-major ()
-  (interactive)
-  (apply 'egg-select-candidate-internal t (egg-get-candsel-target-major)))
+(defun egg-select-candidate-minor (sort)
+  (interactive "P")
+  (apply 'egg-select-candidate-internal sort nil (egg-get-candsel-target-minor)))
 
-(defun egg-select-candidate-list-all-minor ()
-  (interactive)
-  (apply 'egg-select-candidate-internal t (egg-get-candsel-target-minor)))
+(defun egg-select-candidate-list-all-major (sort)
+  (interactive "P")
+  (apply 'egg-select-candidate-internal sort t (egg-get-candsel-target-major)))
 
-(defun egg-select-candidate-internal (all b prev-b next-b next major)
-  (let ((inhibit-read-only t)
-	(prompt (egg-get-message 'candidate))
-	candidates item-list new i)
+(defun egg-select-candidate-list-all-minor (sort)
+  (interactive "P")
+  (apply 'egg-select-candidate-internal sort t (egg-get-candsel-target-minor)))
+
+(defun egg-select-candidate-internal (sort all b prev-b next-b major)
+  (let ((prompt (egg-get-message 'candidate))
+	new-b candidates pos clist item-list i)
     (setq candidates (egg-list-candidates b prev-b next-b major))
     (if (null candidates)
 	(ding)
-      (setq all (and all '(menudiag-list-all))
-	    item-list (egg-numbering-item (cdr candidates))
+      (setq pos (car candidates)
+	    clist (cdr candidates)
+	    item-list (egg-sort-item (egg-numbering-item clist) sort)
 	    i (menudiag-select (list 'menu prompt item-list)
-			       (cons (nth (car candidates) item-list) all))
-	    new (egg-decide-candidate b i prev-b next-b)
-	    prev-b (nth 1 new)
-	    next-b (nth 2 new)
-	    new (car new))
-      (egg-set-candsel-info new prev-b next-b major)
-      (egg-insert-new-bunsetsu new prev-b next-b next nil))))
+			       all
+			       (list (assq (nth pos clist) item-list))))
+      (if (or (null (egg-conversion-fence-p))
+	      (null (egg-check-candsel-target b prev-b next-b major)))
+	  (error "Fence was already modified")
+	(let ((inhibit-read-only t))
+	  (setq new-b (egg-decide-candidate b i prev-b next-b))
+	  (egg-set-candsel-info new-b major)
+	  (egg-insert-new-bunsetsu b (caddr new-b) new-b))))))
+
+(defun egg-hiragana (&optional minor)
+  (interactive "P")
+  (if (null minor)
+      (apply 'egg-special-convert this-command (egg-get-candsel-target-major))
+    (apply 'egg-special-convert this-command (egg-get-candsel-target-minor))))
+
+(defalias 'egg-katakana 'egg-hiragana)
+(defalias 'egg-pinyin 'egg-hiragana)
+(defalias 'egg-zhuyin 'egg-hiragana)
+(defalias 'egg-hangul 'egg-hiragana)
+
+(defun egg-special-convert (type b prev-b next-b major)
+  (let ((inhibit-read-only t)
+	(new-b (egg-special-candidate b prev-b next-b major type)))
+    (if (null new-b)
+	(ding)
+      (egg-set-candsel-info new-b major)
+      (egg-insert-new-bunsetsu b (caddr new-b) new-b))))
 
 (defun egg-separate-characters (str)
   (let* ((v (egg-string-to-vector str))
@@ -915,7 +1014,7 @@ next/previous-candidate, if positive num
 
 (defun egg-enlarge-bunsetsu-internal (n major)
   (let ((inhibit-read-only t)
-	b prev-b next-b s1 s1len s2 s2len nchar i last next end beep)
+	b prev-b next-b new-b s1 s1len s2 s2len nchar i last end beep)
     (if major
 	(setq b (egg-get-major-bunsetsu (point))
 	      prev-b (egg-get-previous-major-bunsetsu (point)))
@@ -938,28 +1037,23 @@ next/previous-candidate, if positive num
      ((<= n 0)
       (setq beep t nchar (and (/= s1len 1) (egg-get-char-size 0 s1))))
      ((> n s2len)
-      (setq beep t nchar (and (/= s2len 0) (length s2))))
+      (setq beep t nchar (and (/= s2len s1len) (length s2))))
      (t
       (setq nchar 0)
       (while (> n 0)
 	(setq nchar (+ nchar (egg-get-char-size nchar s2))
 	      n (1- n)))))
-    (if nchar
-	(progn
-	  (setq next-b (nconc b next-b)
-		i (length (egg-get-bunsetsu-source (car next-b))))
-	  (while (< i nchar)
-	    (setq next-b (cdr next-b)
-		  i (+ i (length (egg-get-bunsetsu-source (car next-b))))))
-	  (setq next-b (prog1 (cdr next-b) (setcdr next-b nil))
-		next (egg-next-bunsetsu-point (point) (length b))
-		b (egg-change-bunsetsu-length b prev-b next-b nchar major))
-	  (if (null b)
-	      (setq beep t)
-	    (setq prev-b (nth 1 b)
-		  next-b (nth 2 b)
-		  b (car b))
-	    (egg-insert-new-bunsetsu b prev-b next-b next (and next-b end)))))
+    (when nchar
+      (setq next-b (nconc b next-b)
+	    i (length (egg-get-bunsetsu-source (car next-b))))
+      (while (< i nchar)
+	(setq next-b (cdr next-b)
+	      i (+ i (length (egg-get-bunsetsu-source (car next-b))))))
+      (setq next-b (prog1 (cdr next-b) (setcdr next-b nil))
+	    new-b (egg-change-bunsetsu-length b prev-b next-b nchar major))
+      (if (null new-b)
+	  (setq beep t)
+	(egg-insert-new-bunsetsu b (and (caddr new-b) next-b) new-b)))
     (if beep
 	(ding))))
 
@@ -1013,13 +1107,13 @@ next/previous-candidate, if positive num
 		  (previous-single-property-change (point) 'egg-start)))
 	 (end (if (get-text-property (point) 'egg-end)
 		  (point)
-		(next-single-property-change (point) 'egg-end)))
+		(egg-next-single-property-change (point) 'egg-end)))
 	 (decided (buffer-substring start (point)))
 	 (undecided (buffer-substring (point) end))
 	 i len bunsetsu source context)
     (delete-region
      (previous-single-property-change start 'egg-start nil (point-min))
-     (next-single-property-change end 'egg-end nil (point-max)))
+     (egg-next-single-property-change end 'egg-end nil (point-max)))
     (setq i 0
 	  len (length decided))
     (while (< i len)
@@ -1028,9 +1122,7 @@ next/previous-candidate, if positive num
       (if (or (= i len)
 	      (egg-get-bunsetsu-last (1- i) decided))
 	  (progn
-	    (apply 'insert (mapcar
-			    (lambda (b) (egg-get-bunsetsu-converted b))
-			    bunsetsu))
+	    (insert (mapconcat 'egg-get-bunsetsu-converted bunsetsu nil))
 	    (setq context (cons (cons (egg-bunsetsu-get-backend (car bunsetsu))
 				      (egg-end-conversion bunsetsu nil))
 				context)
@@ -1061,19 +1153,19 @@ next/previous-candidate, if positive num
 		  (previous-single-property-change (point) 'egg-start)))
 	 (end (if (get-text-property (point) 'egg-end)
 		  (point)
-		(next-single-property-change (point) 'egg-end)))
+		(egg-next-single-property-change (point) 'egg-end)))
 	 (bunsetsu (egg-get-bunsetsu-info start)))
     (delete-region
      (previous-single-property-change start 'egg-start nil (point-min))
-     (next-single-property-change end 'egg-end nil (point-max)))
+     (egg-next-single-property-change end 'egg-end nil (point-max)))
     (egg-end-conversion (list bunsetsu) nil)
     (insert (egg-string-to-char-at (egg-get-bunsetsu-converted bunsetsu) 0))))
 
 (defun egg-exit-conversion ()
   (interactive)
-  (if (egg-get-bunsetsu-info (point))
+  (if (egg-conversion-fence-p)
       (progn
-	(goto-char (next-single-property-change (point) 'egg-end))
+	(goto-char (egg-next-single-property-change (point) 'egg-end))
 	(egg-decide-before-point))))
 
 (defun egg-abort-conversion ()
@@ -1087,8 +1179,8 @@ next/previous-candidate, if positive num
 		'egg-start nil (point-min)))
     (setq source (get-text-property (point) 'egg-source)
 	  context (get-text-property (point) 'egg-context))
-    (delete-region (point) (next-single-property-change
-			    (next-single-property-change (point) 'egg-end)
+    (delete-region (point) (egg-next-single-property-change
+			    (egg-next-single-property-change (point) 'egg-end)
 			    'egg-end nil (point-max)))
     (its-restart source nil nil context)))
 
@@ -1156,4 +1248,5 @@ next/previous-candidate, if positive num
     (help-setup-xref (cons #'help-xref-mode (current-buffer)) (interactive-p))))
 
 (provide 'egg-cnv)
-;;; egg-cnv.el ends here.
+
+;;; egg-cnv.el ends here
Index: egg-com.el
===================================================================
RCS file: /cvs/tamago/tamago/egg-com.el,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -d -u -p -r1.1.1.1 -r1.2
--- egg-com.el	27 Jan 2001 18:45:24 -0000	1.1.1.1
+++ egg-com.el	27 Jan 2001 18:53:13 -0000	1.2
@@ -136,6 +136,7 @@
 		    (cons ccl-decode-fixed-euc-kr ccl-encode-fixed-euc-kr))
 
 ;; Chinese
+
 (defconst egg-pinyin-shengmu
   '((""  . 0)  ("B" . 1)  ("C"  . 2)  ("Ch" . 3)  ("D" . 4)
     ("F" . 5)  ("G" . 6)  ("H"  . 7)  ("J"  . 8)  ("K" . 9)
@@ -521,53 +522,60 @@
 (defun decode-fixed-euc-china-region (beg end type zhuyin)
   "Decode EUC-CN/TW encoded text in the region.
 Return the length of resulting text."
-  (prog1
-      (let ((str (string-as-unibyte (buffer-substring beg end)))
-	    (i 0)
-	    l c0 c1 s y ss)
-	(delete-region beg end)
-	(setq l (1- (length str)))
-	(while (< i l)
-	  (setq c0 (aref str i)
-		c1 (aref str (1+ i))
-		i  (+ i 2))
-	  (cond
-	   ((eq c0 0)
-	    (if (> c1 ?\xa0)
-		(insert leading-code-private-11
-			(charset-id 'chinese-sisheng)
-			c1)
-	      (insert c1)))
-	   ((>= c0 ?\x80)
-	    (cond
-	     ((eq type 'cn)
-	      (insert (charset-id 'chinese-gb2312) c0 (logior c1 ?\x80)))
-	     ((>= c1 ?\x80)
-	      (insert (charset-id 'chinese-cns11643-1) c0 c1))
-	     (t
-	      (insert (charset-id 'chinese-cns11643-2) c0 (+ c1 ?\x80)))))
-	   (t
-	    (setq c1 (logand c1 ?\x7f))
-	    (setq s (- (lsh c1 -2) 7);;(+ (lsh (- c1 32) -2) 1)
-		  y (- (lsh c0 -1) 16);;(lsh (- c0 32) -1)
-		  ss (+ (logand c0 1) (logand c1 3)))
-	    (if (and (eq s 20)
-		     (eq (aref egg-pinyin-table (+ (* 39 20) y)) 0))
-		(setq s 0))
-	    (if (null zhuyin)
-		(setq s (car (nth s egg-pinyin-shengmu))
-		      y (car (nth (+ (* 5 y) ss) egg-pinyin-yunmu)))
-	      (setq c0 (aref egg-zhuyin-table (+ (* 41 s) y)))
-	      (if (eq (logand c0 ?\x8080) ?\x80)
-		  (setq s (lsh c0 -8)
-			y (logand c0 ?\x7f)))
-	      (setq s (car (nth s egg-zhuyin-shengmu))
-		    y (car (nth (+ (* 5 y) ss) egg-zhuyin-yunmu))))
-	    (if enable-multibyte-characters
-		(insert s y)
-	      (insert (string-as-unibyte s) (string-as-unibyte y))))))
-	(- (point) beg))
-    (if (looking-at "\0\0") (forward-char 2))))
+  (let ((str (string-as-unibyte (buffer-substring beg end)))
+	(i 0)
+	(char (make-string 3 0))
+	l c0 c1 s y ss)
+    (delete-region beg end)
+    (setq l (1- (length str)))
+    (while (< i l)
+      (setq c0 (aref str i)
+	    c1 (aref str (1+ i))
+	    i  (+ i 2))
+      (cond
+       ((eq c0 0)
+	(if (<= c1 ?\xa0)
+	    (insert c1)
+	  (aset char 0 leading-code-private-11)
+	  (aset char 1 (charset-id 'chinese-sisheng))
+	  (aset char 2 c1)
+	  (insert (string-as-multibyte char))))
+       ((>= c0 ?\x80)
+	(cond
+	 ((eq type 'cn)
+	  (aset char 0 (charset-id 'chinese-gb2312))
+	  (aset char 1 c0)
+	  (aset char 2 (logior c1 ?\x80)))
+	 ((>= c1 ?\x80)
+	  (aset char 0 (charset-id 'chinese-cns11643-1))
+	  (aset char 1 c0)
+	  (aset char 2 c1))
+	 (t
+	  (aset char 0 (charset-id 'chinese-cns11643-2))
+	  (aset char 1 c0)
+	  (aset char 2 (+ c1 ?\x80))))
+	(insert (string-as-multibyte char)))
+       (t
+	(setq c1 (logand c1 ?\x7f))
+	(setq s (- (lsh c1 -2) 7);;(+ (lsh (- c1 32) -2) 1)
+	      y (- (lsh c0 -1) 16);;(lsh (- c0 32) -1)
+	      ss (+ (logand c0 1) (logand c1 3)))
+	(if (and (eq s 20)
+		 (eq (aref egg-pinyin-table (+ (* 39 20) y)) 0))
+	    (setq s 0))
+	(if (null zhuyin)
+	    (setq s (car (nth s egg-pinyin-shengmu))
+		  y (car (nth (+ (* 5 y) ss) egg-pinyin-yunmu)))
+	  (setq c0 (aref egg-zhuyin-table (+ (* 41 s) y)))
+	  (if (eq (logand c0 ?\x8080) ?\x80)
+	      (setq s (lsh c0 -8)
+		    y (logand c0 ?\x7f)))
+	  (setq s (car (nth s egg-zhuyin-shengmu))
+		y (car (nth (+ (* 5 y) ss) egg-zhuyin-yunmu))))
+	(if enable-multibyte-characters
+	    (insert s y)
+	  (insert (string-as-unibyte s) (string-as-unibyte y))))))
+    (- (point) beg)))
 
 (defun post-read-decode-fixed-euc-china (len type zhuyin)
   (let ((pos (point))
@@ -620,7 +628,7 @@ Return the length of resulting text."
 
 (eval-and-compile
 (define-ccl-program ccl-decode-egg-binary
-  `(2
+  `(1
     ((read r0)
      (loop
       (if (r0 == ?\xff)
@@ -628,7 +636,7 @@ Return the length of resulting text."
       (write-read-repeat r0)))))
 
 (define-ccl-program ccl-encode-egg-binary
-  `(1
+  `(2
     ((read r0)
      (loop
       (if (r0 == ?\xff)
@@ -705,6 +713,7 @@ U: 32-bit integer.  The argument is 2 el
 u: 32-bit integer.  The argument is treat as unsigned integer.
    (Note:  Elisp's integer may be less than 32 bits)
 i: 32-bit integer.
+   (Note:  Elisp's integer may be greater than 32 bits)
 w: 16-bit integer.
 b: 8-bit integer.
 S: 16-bit wide-character EUC string (0x0000 terminated).
@@ -776,6 +785,14 @@ V: Fixed length string (0x00 terminated)
 	  (+ (lsh (comm-following+forward-char) 8)
 	     (comm-following+forward-char)))))
 
+(defun comm-unpack-i32 ()
+  (progn
+    (comm-require-process-output 4)
+    (+ (lsh (- (logxor (comm-following+forward-char) 128) 128) 24)
+       (lsh (comm-following+forward-char) 16)
+       (lsh (comm-following+forward-char) 8)
+       (comm-following+forward-char))))
+
 (defun comm-unpack-u32 ()
   (progn
     (comm-require-process-output 4)
@@ -852,7 +869,7 @@ See `comm-format' for FORMAT."
 	     (list
 	      (cond ((eq f 'U) `(setq ,arg (comm-unpack-u32c)))
 		    ((eq f 'u) `(setq ,arg (comm-unpack-u32)))
-		    ((eq f 'i) `(setq ,arg (comm-unpack-u32)))
+		    ((eq f 'i) `(setq ,arg (comm-unpack-i32)))
 		    ((eq f 'w) `(setq ,arg (comm-unpack-u16)))
 		    ((eq f 'b) `(setq ,arg (comm-unpack-u8)))
 		    ((eq f 'S) `(setq ,arg (comm-unpack-u16-string)))
Index: egg-mlh.el
===================================================================
RCS file: /cvs/tamago/tamago/egg-mlh.el,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -d -u -p -r1.1.1.1 -r1.2
--- egg-mlh.el	27 Jan 2001 18:45:24 -0000	1.1.1.1
+++ egg-mlh.el	23 Aug 2002 07:46:38 -0000	1.2
@@ -3,10 +3,10 @@
 
 ;; Copyright (C) 1999, 2000 Free Software Foundation, Inc
 
-;; Author: NIIBE Yutaka <gniibe@chroot.org>
+;; Author: NIIBE Yutaka <gniibe@m17n.org>
 ;;         KATAYAMA Yoshio <kate@pfu.co.jp>      ; Multilingual Enhancement
 
-;; Maintainer: TOMURA Satoru <tomura@etl.go.jp>
+;; Maintainer: NIIBE Yutaka <gniibe@m17n.org>
 
 ;; Keywords: mule, multilingual, input method
 
Index: egg-sim-old.el
===================================================================
RCS file: egg-sim-old.el
diff -N egg-sim-old.el
--- egg-sim-old.el	27 Jan 2001 18:46:59 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,514 +0,0 @@
-;;; egg-sim.el --- EGG Simple Input Method
-
-;; Copyright (C) 2000 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
-;; Copyright (C) 2000 TOMURA Satoru <tomura@etl.go.jp>
-
-
-;; Author: TOMURA Satoru <tomura@etl.go.jp>
-
-;; Maintainer: TOMURA Satoru <tomura@etl.go.jp>
-
-;; Keywords: mule, multilingual, input method
-
-;; This file is part of EGG.
-
-;; EGG is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; EGG is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;; Commentary:
-
-;;; Code:
-
-;;; This code is based on egg-jsymbol.el of Egg V3.
-
-;;; 92.10.18 modified for Mule Ver.0.9.6 by K.Handa <handa@etl.go.jp>
-;;;	Moved from egg.el
-;;; 92.12.26 modified for Mule Ver.0.9.7 by T.Shingu <shingu@cpr.canon.co.jp>
-;;;	JIS Hojo Kanji support.
-
-(require 'menudiag)
-
-(provide 'egg-sim)
-
-(defun make-char-list (charset &optional from to)
-  (let ((result nil)
-	(chars (charset-chars charset))
-	min max)
-    (setq min (if (= chars 96) 32 33)
-	  max (if (= chars 96) 127 126))
-    (setq from (if from (+ min (1- from)) min)
-	  to   (if to (+ min (1- to)) max))
-    (and (<= min from)
-	 (<= to max)
-	 (cond ((= (charset-dimension charset) 1)
-		(while (<= from to)
-		  (setq result (cons (char-to-string
-				      (make-char charset to))
-				     result)
-			to (1- to)))
-		result)
-	       ((= (charset-dimension charset) 2)
-		(while (<= from to)
-		  (let ((code max))
-		    (while (<= min code)
-		      (setq result (cons (char-to-string
-					  (make-char charset to code))
-					 result)
-			    code (1- code))))
-		  (setq to (1- to)))
-		result)))))
-
-(defvar egg-sim-ascii-menu
-  '(menu "ASCII:" ,(make-char-list 'ascii)))
-
-(defvar egg-sim-latin-1-menu
-  `(menu "ISO 8859-1:" ,(make-char-list 'latin-iso8859-1)))
-
-(defvar egg-sim-latin-2-menu
-  `(menu "ISO 8859-2:" ,(make-char-list 'latin-iso8859-2)))
-
-(defvar egg-sim-latin-3-menu
-  `(menu "ISO 8859-3:" ,(make-char-list 'latin-iso8859-3)))
-
-(defvar egg-sim-latin-4-menu
-  `(menu "ISO 8859-4:" ,(make-char-list 'latin-iso8859-4)))
-
-(defvar egg-sim-latin-5-menu
-  `(menu "ISO 8859-9:" ,(make-char-list 'latin-iso8859-9)))
-
-(defvar egg-sim-cyrillic-menu
-  `(menu "ISO 8859-5:" ,(make-char-list 'cyrillic-iso8859-5)))
-
-(defvar egg-sim-arabic-menu
-  `(menu "ISO 8859-6:" ,(make-char-list 'arabic-iso8859-6)))
-
-(defvar egg-sim-greek-menu
-  `(menu "ISO 8859-7:" ,(make-char-list 'greek-iso8859-7)))
-
-(defvar egg-sim-hebrew-menu
-  `(menu "ISO 8859-8:" ,(make-char-list 'hebrew-iso8859-8)))
-
-(defvar egg-sim-thai-menu
-  `(menu "TIS620.2529:" ,(make-char-list 'thai-tis620)))
-
-(defvar egg-sim-lao-menu
-  `(menu "lao:"         ,(make-char-list 'lao)))
-
-(defvar egg-sim-vietnamese-menu
-  `(menu "Vietnamese:"
-	 (("VISCII1.1(lower-case)" .
-	   (menu "VISCII1.1 lower-case:" 
-		 ,(make-char-list 'vietnamese-viscii-lower)))
-	  ("VISCII1.1(upper-case)" . 
-	   (menu "VISCII1.1 upper-case:"
-		 ,(make-char-list 'vietnamese-viscii-upper))))))
-
-(defvar egg-sim-chinese-big5-menu
-  `(menu "Big5:"
-	 (("Level1" .
-	   (menu "Big 5 Level1:" , (make-char-list 'chinese-big5-1)))
-	  ("Level2" .
-	   (menu "Big 5 Level2:" , (make-char-list 'chinese-big5-2))))))
-
-(defvar egg-sim-chinese-cns-menu
-  `(menu "CNS 11643:"
-	 (("Plane-1" .
-	   (menu "CNS 11643-1:" ,(make-char-list 'chinese-cns11643-1)))
-	  ("Plane- 2" .
-	   (menu "CNS 11643-2:" ,(make-char-list 'chinese-cns11643-2)))
-	  ("Plane-3" .
-	   (menu "CNS 11643-3:" ,(make-char-list 'chinese-cns11643-3)))
-	  ("Plane-4" .
-	   (menu "CNS 11643-4:" ,(make-char-list 'chinese-cns11643-4)))
-	  ("Plane-5" .
-	   (menu "CNS 11643-5:" ,(make-char-list 'chinese-cns11643-5)))
-	  ("Plane-6" .
-	   (menu "CNS 11643-6:" ,(make-char-list 'chinese-cns11643-6)))
-	  ("Plane-7" .
-	   (menu "CNS 11643-7:" ,(make-char-list 'chinese-cns11643-7))))))
-
-(defvar egg-sim-chinese-gb-menu
-  `(menu "GB 2312:" 
-	 (("All" . 
-	   (menu "GB 2312:" ,(make-char-list 'chinese-gb2312)))
-	  ("Symbols" . 
-	   (menu "GB2312/1:" ,(make-char-list 'chinese-gb2312 1 1)))
-	  ("Numbers" . 
-	   (menu "GB2312/2:" ,(make-char-list 'chinese-gb2312 2 2)))
-	  ("Fullwidth ASCII" . 
-	   (menu "GB2312/3:" ,(make-char-list 'chinese-gb2312 3 3)))
-	  ("Hiragana" .
-	   (menu "GB2312/4:" ,(make-char-list 'chinese-gb2312 4 4)))
-	  ("Katanaka" . 
-	   (menu "GB2312/5:" ,(make-char-list 'chinese-gb2312 5 5)))
-	  ("Greek" . 
-	   (menu "GB2312/6:" ,(make-char-list 'chinese-gb2312 6 6)))
-	  ("Cyrillic" . 
-	   (menu "GB2312/7:" ,(make-char-list 'chinese-gb2312 7 7)))
-	  ("Pinyin/Bopomofo" . 
-	   (menu "GB2312/8:" ,(make-char-list 'chinese-gb2312 8 8)))
-	  ("Box Drawings" . 
-	   (menu "GB2312/9:" ,(make-char-list 'chinese-gb2312 9 9)))
-	  )))
-
-(defvar egg-sim-chinese-menu
-  `(menu "Chinese:"
-	 (("GB2312"  . , egg-sim-chinese-gb-menu)
-	  ("CNS11643" . , egg-sim-chinese-cns-menu)
-	  ("Big5" . , egg-sim-chinese-big5-menu))))
-
-(defvar egg-sim-korean-menu
-  `(menu "Korean:"
-	 (("KSC5601"  .
-	   (menu "KSC 5601:" ,(make-char-list 'korean-ksc5601)))
-	  ("Symbol" .
-	   (menu "KSC 5601/1-2:" ,(make-char-list 'korean-ksc5601 1 2)))
-	  ("Fullwidth ASCII" .
-	   (menu "KSC 5601/3:" , (make-char-list 'korean-ksc5601 3 3)))
-	  ("Jamo" .
-	   (menu "KSC 5601/4:" , (make-char-list 'korean-ksc5601 4 4)))
-	  ("Roman Number/Greek" .
-	   (menu "KSC 5601/5:" , (make-char-list 'korean-ksc5601 5 5)))
-	  ("Box Drawings" .
-	   (menu "KSC 5601/6:" , (make-char-list 'korean-ksc5601 6 6)))
-	  ("Unit" .
-	   (menu "KSC 5601/7:" , (make-char-list 'korean-ksc5601 7 7)))
-	  ("Misc." .
-	   (menu "KSC 5601/8-9:" , (make-char-list 'korean-ksc5601 8 9)))
-	  ("Hiragana" .
-	   (menu "KSC 5601/10:" , (make-char-list 'korean-ksc5601 10 10)))
-	  ("Katakana" .
-	   (menu "KSC 5601/11:" , (make-char-list 'korean-ksc5601 11 11)))
-	  ("Cyrillic" .
-	   (menu "KSC 5601/12:" , (make-char-list 'korean-ksc5601 12 12)))
-	  ("Hangul" .
-	   (menu "KSC 5601/16-40:" , (make-char-list 'korean-ksc5601 16 40)))
-	  ("Hanja" .
-	   (menu "KSC 5601/42-93:" , (make-char-list 'korean-ksc5601 42 93))))))
-
-(defvar egg-sim-japanese-menu 
-  `(menu "Japanese:"
-	 (("JISX0201" .
-	   ,(append (make-char-list 'latin-jisx0201)
-		    (make-char-list 'katakana-jisx0201)))
-	  ("JISX0208" .
-	   (menu "JIS X 0208:" ,(make-char-list 'japanese-jisx0208)))
-	  ("JISX0212" .
-	   (menu "JIS X 0212:" ,(make-char-list 'japanese-jisx0212)))
-	  ("JISX0208/0212" .
-	   (menu "$B5-9fF~NO(B:"
-		 (("JIS$BF~NO(B" . japanese-jisx0208)
-		  ("$B5-9f(B"     . 
-		   (menu "$B5-9f(B:"     , (make-char-list 'japanese-jisx0208 1 2)))
-		  ("$B1Q?t;z(B"   . 
-		   (menu "$B1Q?t;z(B:"   , (make-char-list 'japanese-jisx0208 3 3)))
-		  ("$B$R$i$,$J(B" . 
-		   (menu "$B$R$i$,$J(B:" , (make-char-list 'japanese-jisx0208 4 4)))
-		  ("$B%+%?%+%J(B" . 
-		   (menu "$B%+%?%+%J(B:" , (make-char-list 'japanese-jisx0208 5 5)))
-		  ("$B%.%j%7%cJ8;z(B" . 
-		   (menu "$B%.%j%7%cJ8;z(B:" , (make-char-list 'japanese-jisx0208 6 6)))
-		  ("$B%-%j%kJ8;z(B" . 
-		   (menu "$B%-%j%kJ8;z(B:" , (make-char-list 'japanese-jisx0208 7 7)))
-		  ("$B7S@~(B" . 
-		   (menu "$B7S@~(B:" , (make-char-list 'japanese-jisx0208 8 8)))
-			  ;;;"$BIt<sF~NO(B"  (bushyu-input)
-                          ;;; "$B2h?tF~NO(B" (kakusuu-input)
-		  ("$BBh0l?e=`(B" . 
-		   (menu "$BBh0l?e=`(B:" , (make-char-list 'japanese-jisx0208 16 47)))
-		  ("$BBhFs?e=`(B" . 
-		   (menu "$BBhFs?e=`(B:" , (make-char-list 'japanese-jisx0208 48 84)))
-		  ("$BJd=u4A;z(B" . 
-		   (menu "$BJd=u4A;z(B:" , (make-char-list 'japanese-jisx0212 2 77)))))))))
-
-(defvar egg-sim-ipa-menu
-  `(menu "IPA:" ,(make-char-list 'ipa)))
-
-(defvar egg-sisheng-menu
-  `(menu "SiSheng characters" ,(make-char-list 'chinese-sisheng)))
-
-(defvar egg-sim-code-input-menu
-  `(menu "Charset:"
-	 (("JISX0208" . japanese-jisx0208)
-	  ("JISX0212" . japanese-jisx0212)
-	  ("CNS11643-1" . chinese-cns11634-1)
-	  ("CNS11643-2" . chinese-cns11634-2)
-	  ("CNS11643-3" . chinese-cns11634-3)
-	  ("CNS11643-4" . chinese-cns11634-4)
-	  ("CNS11643-5" . chinese-cns11634-5)
-	  ("CNS11643-6" . chinese-cns11634-6)
-	  ("CNS11643-7" . chinese-cns11634-7)
-	  ("Big5-1" . chinese-big5-1)
-	  ("Big5-2" . chinese-big5-2)
-	  ("GB2312" . chinese-gb2312)
-	  ("KSC5601" . korean-ksc5601))))
-
-(defvar egg-simple-input-method-menu-item-list
-  `(("Code Input" . ,egg-sim-code-input-menu)
-    ("Arabic"   . , egg-sim-arabic-menu)
-    ("ASCII"    . , egg-sim-ascii-menu)
-    ("Chinese"  . , egg-sim-chinese-menu)
-    ("Cyrillic" . , egg-sim-cyrillic-menu)
-    ("Greek"    . , egg-sim-greek-menu)
-    ("Hebrew"   . , egg-sim-hebrew-menu)
-    ("Japanese" . , egg-sim-japanese-menu)
-    ("Korean"   . , egg-sim-korean-menu)
-    ("Latin" . 
-     (menu "Latin:"
-	   (("Latin-1" . , egg-sim-latin-1-menu)
-	    ("Latin-2" . , egg-sim-latin-2-menu)
-	    ("Latin-3" . , egg-sim-latin-3-menu)
-	    ("Latin-4" . , egg-sim-latin-4-menu)
-	    ("Latin-5" . , egg-sim-latin-5-menu))))
-    ("Thai/Lao" . 
-     (menu "Thai/Lao:"
-	   (("Thai" . , egg-sim-thai-menu)
-	    ("Lao"  . , egg-sim-lao-menu))))
-    ("Vietnamese" . , egg-sim-vietnamese-menu)
-    ("Phonetic code" . 
-     (menu "Phonetic code:"
-	   (("SISHENG" . , egg-sisheng-menu)
-	    ("IPA" .  , egg-sim-ipa-menu))))
-    ))
-
-(defvar egg-language-environment-alist 
-  `(("ASCII"         . , egg-sim-ascii-menu)
-    ("Chinese-BIG5"  . , egg-sim-chinese-big5-menu)
-    ("Chinese-CNS"   . , egg-sim-chinese-cns-menu)
-    ("Chinese-GB"    . , egg-sim-chinese-gb-menu)
-    ("Cyrillic-ISO"  . , egg-sim-cyrillic-menu)
-    ("Cyrillic-KOI8" . , egg-sim-cyrillic-menu)
-    ("Cyrillic-ALT"  . , egg-sim-cyrillic-menu)
-    ("Czech"         . , egg-sim-latin-2-menu)
-    ("Devanagari")
-    ("English"       . , egg-sim-ascii-menu)
-    ("Ethiopic")
-    ("German"        . , egg-sim-latin-1-menu)
-    ("Greek"         . , egg-sim-greek-menu)
-    ("Hebrew"        . , egg-sim-hebrew-menu)
-    ("Hindi")
-    ("IPA"           . , egg-sim-ipa-menu)
-    ("Japanese"      . , egg-sim-japanese-menu)
-    ("Korean"        . , egg-sim-korean-menu)
-    ("Lao"           . , egg-sim-lao-menu)
-    ("Latin-1"       . , egg-sim-latin-1-menu)
-    ("Latin-2"       . , egg-sim-latin-2-menu)
-    ("Latin-3"       . , egg-sim-latin-3-menu)
-    ("Latin-4"       . , egg-sim-latin-4-menu)
-    ("Latin-5"       . , egg-sim-latin-5-menu)
-    ("Romaian"       . , egg-sim-latin-2-menu)
-    ("Slovenian"     . , egg-sim-latin-2-menu)
-    ("Slovak"        . , egg-sim-latin-2-menu)
-    ("Thai"          . , egg-sim-thai-menu)
-    ("Tibetan")
-    ("Turkish"       . , egg-sim-latin-5-menu)
-    ("Vietnamese"    . , egg-sim-vietnamese-menu)))
-
-(defvar egg-simple-input-method-menu
-  `(menu "Character set:" , egg-simple-input-method-menu-item-list))
-
-;;;;###autoload
-(defun egg-simple-input-method()
-  (interactive)
-  (let ((result (egg-simple-input-menu)))
-    (cond((stringp result)
-	  (insert result))
-	 ((symbolp result)
-	  (egg-character-code-input result
-				    (format "%s/Character Code in Hexadecimal:"
-					    (charset-description result)))))))
-
-(defun egg-simple-input-menu ()
-  (let ((menu (cdr-safe (assoc current-language-environment 
-			       egg-language-environment-alist))))
-    (if menu
-	(menudiag-select
-	 `(menu "Character set:" ,(cons (cons current-language-environment
-					      menu)
-					egg-simple-input-method-menu-item-list)))
-      (menudiag-select egg-simple-input-method-menu))))
-
-(defun egg-character-code-input (charset prompt)
-  (egg-insert-character-code-from-minibuffer charset prompt))
-
-(defun egg-insert-character-code-from-minibuffer (charset prompt)
-  (let ((str (read-from-minibuffer prompt)) val)
-    (while (null (setq val (egg-read-character-code-from-string str charset)))
-      (beep)
-      (setq str (read-from-minibuffer prompt str)))
-    (insert (make-char charset (car val) (cdr val)))))
-
-(defun egg-hexadigit-value (ch)
-  (cond((and (<= ?0 ch) (<= ch ?9))
-	(- ch ?0))
-       ((and (<= ?a ch) (<= ch ?f))
-	(+ (- ch ?a) 10))
-       ((and (<= ?A ch) (<= ch ?F))
-	(+ (- ch ?A) 10))))
-
-(defun egg-read-character-code-from-string (str charset)
-  (if (and (= (length str) 4)
-	   (<= 2 (egg-hexadigit-value (aref str 0)))
-	   (egg-hexadigit-value (aref str 1))
-	   (<= 2 (egg-hexadigit-value (aref str 2)))
-	   (egg-hexadigit-value (aref str 3)))
-      (let ((code1 (+ (* 16 (egg-hexadigit-value (aref str 0)))
-		      (egg-hexadigit-value (aref str 1))))
-	    (code2 (+ (* 16 (egg-hexadigit-value (aref str 2)))
-		      (egg-hexadigit-value (aref str 3))))
-	    (min (if (= (charset-chars charset) 94)
-		     33 32))
-	    (max (if (= (charset-chars charset) 94)
-		     126 127)))
-	(and (<= min code1)
-	     (<= code1 max)
-	     (<= min code2)
-	     (<= code2 max)
-	     (cons code1 code2)))))
-
-;;;
-;;;
-;;;
-
-(defun make-non-iso2022-code-table-file (name)
-  (with-temp-file name
-    (set-buffer-multibyte nil)
-    (insert ";;; -*- coding: -*-\n\n")
-    (insert " |")
-
-    (let ((i 0))
-      (while (< i 16)
-	(insert (format "  %X " i))
-	(setq i (1+ i))))
-    (insert "\n")
-
-    (insert "-+")
-    (let ((i 0))
-      (while (< i 16)
-	(insert (format "----" i))
-	(setq i (1+ i))))
-    (insert "\n")
-
-    (let ((i 0))
-      (while (< i 16)
-	(insert (format "%X|" i))
-	(let ((j 0) (c i))
-	  (while (< j 16)
-	    (insert (format " \"%c\"" c))
-	    (setq j (1+ j)
-		  c (+ c 16)))
-	  (insert (format "\n")))
-	(setq i (1+ i))))))
-
-(defun make-iso2022-94char-code-table-file (name)
-  (with-temp-file name
-    (set-buffer-multibyte nil)
-    (insert ";;; -*- coding: -*-\n\n")
-    (insert " |")
-    (let ((i 0))
-      (while (< i 16)
-	(insert (format "  %X " i))
-	(setq i (1+ i))))
-    (insert "\n")
-
-    (insert "-+")
-    (let ((i 0))
-      (while (< i 16)
-	(insert (format "----" i))
-	(setq i (1+ i))))
-    (insert "\n")
-
-    (let ((i 0))
-      (while (< i 16)
-	(insert (format "%X|" i))
-	(let ((j 0) (c i))
-	  (while (< j 16)
-	    (if (or (<= c 31)
-		    (= c 127)
-		    (and (<= 128 c)
-			 (<= c 160))
-		    (= c 255))
-		(insert "    ")
-	      (insert (format " \"%c\"" c)))
-	    (setq j (1+ j)
-		  c (+ c 16)))
-	  (insert (format "\n")))
-	(setq i (1+ i))))))
-  
-(defun make-iso2022-96char-code-table-file (name)
-  (with-temp-file name
-    (set-buffer-multibyte nil)
-    (insert ";;; -*- coding: -*-\n\n")
-    (insert " |")
-    (let ((i 0))
-      (while (< i 16)
-	(insert (format "  %X " i))
-	(setq i (1+ i))))
-    (insert "\n")
-
-    (insert "-+")
-    (let ((i 0))
-      (while (< i 16)
-	(insert (format "----" i))
-	(setq i (1+ i))))
-    (insert "\n")
-
-    (let ((i 0))
-      (while (< i 16)
-	(insert (format "%X|" i))
-	(let ((j 0) (c i))
-	  (while (< j 16)
-	    (if (or (<= c 31)
-		    (= c 127)
-		    (and (<= 128 c)
-			 (< c 160)))
-		(insert "    ")
-	      (insert (format " \"%c\"" c)))
-	    (setq j (1+ j)
-		  c (+ c 16)))
-	  (insert (format "\n")))
-	(setq i (1+ i))))))
-
-(defun make-euc-code-table-file (name)
-  (with-temp-file name
-    (set-buffer-multibyte nil)
-    (insert ";;; -*- coding: -*-\n\n")
-    (insert "  |")
-    (let ((i 1))
-      (while (<= i 94)
-        ;;                "XX"
-	(insert (format "  %02d " i))
-	(setq i (1+ i))))
-    (insert "\n")
-
-    (insert "-+")
-    (let ((i 1))
-      (while (<= i 94)
-	(insert (format "-----" i))
-	(setq i (1+ i))))
-    (insert "\n")
-
-    (let ((i 1))
-      (while (<= i 94)
-	(insert (format "%02d|" i))
-	(let ((j 1))
-	  (while (<= j 94)
-	    (insert (format " \"%c%c\""
-			    (+ i 32 128)
-			    (+ j 32 128)))
-	    (setq j (1+ j)))
-	  (insert (format "\n")))
-	(setq i (1+ i))))))
\ No newline at end of file
Index: egg-sim.el
===================================================================
RCS file: /cvs/tamago/tamago/egg-sim.el,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -d -u -p -r1.1.1.1 -r1.2
--- egg-sim.el	27 Jan 2001 18:46:59 -0000	1.1.1.1
+++ egg-sim.el	27 Jan 2001 18:53:13 -0000	1.2
@@ -73,7 +73,7 @@
 		result)))))
 
 (defvar egg-sim-ascii-menu
-  '(menu "ASCII:" ,(make-char-list 'ascii)))
+  `(menu "ASCII:" ,(make-char-list 'ascii)))
 
 (defvar egg-sim-latin-1-menu
   `(menu "ISO 8859-1:" ,(make-char-list 'latin-iso8859-1)))
@@ -355,7 +355,7 @@
   `(menu "Character set:" , egg-simple-input-method-menu-item-list))
 
 ;;;;###autoload
-(defun egg-simple-input-method()
+(defun egg-simple-input-method ()
   (interactive)
   (let ((result (egg-simple-input-menu)))
     (cond((stringp result)
@@ -545,4 +545,4 @@
 			    (+ j 32 128)))
 	    (setq j (1+ j)))
 	  (insert (format "\n")))
-	(setq i (1+ i))))))
\ No newline at end of file
+	(setq i (1+ i))))))
Index: egg-simv.el
===================================================================
RCS file: egg-simv.el
diff -N egg-simv.el
--- egg-simv.el	27 Jan 2001 18:46:59 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,47 +0,0 @@
-
- |  0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F 
--+----------------------------------------------------------------
-0|         " " "0" "@" "P" "`" "p" ",2U(B" ",20(B" ",2u(B" ",10(B" ",2`(B" ",2p(B" ",1`(B" ",1p(B"
-1|         "!" "1" "A" "Q" "a" "q" ",2!(B" ",21(B" ",1!(B" ",11(B" ",2a(B" ",1Q(B" ",1a(B" ",1q(B"
-2| ",2F(B"     """ "2" "B" "R" "b" "r" ",2"(B" ",22(B" ",1"(B" ",12(B" ",2b(B" ",2r(B" ",1b(B" ",1r(B"
-3|         "#" "3" "C" "S" "c" "s" ",2#(B" ",25(B" ",1#(B" ",2^(B" ",2c(B" ",2s(B" ",1c(B" ",1s(B"
-4|     ",2V(B" "$" "4" "D" "T" "d" "t" ",2$(B" ",2~(B" ",1$(B" ",2=(B" ",2d(B" ",2t(B" ",1d(B" ",1t(B"
-5| ",2G(B"     "%" "5" "E" "U" "e" "u" ",2%(B" ",2>(B" ",1%(B" ",15(B" ",2e(B" ",1U(B" ",1e(B" ",1u(B"
-6| ",2g(B"     "&" "6" "F" "V" "f" "v" ",2&(B" ",26(B" ",1&(B" ",16(B" ",1F(B" ",1V(B" ",1f(B" ",1v(B"
-7|         "'" "7" "G" "W" "g" "w" ",2'(B" ",27(B" ",1'(B" ",17(B" ",1G(B" ",1W(B" ",1g(B" ",1w(B"
-8|         "(" "8" "H" "X" "h" "x" ",2((B" ",28(B" ",1((B" ",18(B" ",2h(B" ",1X(B" ",1h(B" ",1x(B"
-9|     ",2[(B" ")" "9" "I" "Y" "i" "y" ",2)(B" ",2v(B" ",1)(B" ",2q(B" ",2i(B" ",2y(B" ",1i(B" ",1y(B"
-A|         "*" ":" "J" "Z" "j" "z" ",2*(B" ",2w(B" ",1*(B" ",2Q(B" ",2j(B" ",2z(B" ",1j(B" ",1z(B"
-B|         "+" ";" "K" "[" "k" "{" ",2+(B" ",2o(B" ",1+(B" ",2W(B" ",2k(B" ",1[(B" ",1k(B" ",1{(B"
-C|         "," "<" "L" "\" "l" "|" ",2,(B" ",2|(B" ",1,(B" ",2X(B" ",2l(B" ",1\(B" ",1l(B" ",1|(B"
-D|         "-" "=" "M" "]" "m" "}" ",2-(B" ",2{(B" ",1-(B" ",1=(B" ",2m(B" ",2}(B" ",1m(B" ",1}(B"
-E|     ",2\(B" "." ">" "N" "^" "n" "~" ",2.(B" ",2x(B" ",1.(B" ",1>(B" ",2n(B" ",1^(B" ",1n(B" ",1~(B"
-F|         "/" "?" "O" "_" "o"     ",2/(B" ",2O(B" ",1/(B" ",2_(B" ",1O(B" ",1_(B" ",1o(B" ",2f(B"
-
-"a" ",1`(B" ",1d(B" ",1c(B" ",1a(B" ",1U(B"
-",1e(B" ",1"(B" ",1F(B" ",1G(B" ",1!(B" ",1#(B"
-",1b(B" ",1%(B" ",1&(B" ",1g(B" ",1$(B" ",1'(B"
-"e" ",1i(B" ",1k(B" ",1((B" ",1h(B" ",1)(B"
-",1j(B" ",1*(B" ",1,(B" ",1-(B" ",1+(B" ",1.(B" 
-"i" ",1m(B" ",1o(B" ",1n(B" ",1l(B" ",18(B"
-"o" ",1s(B" ",1v(B" ",1u(B" ",1r(B" ",1w(B"
-",1t(B" ",1/(B" ",11(B" ",12(B" ",10(B" ",15(B"
-",1=(B" ",1>(B" ",17(B" ",1^(B" ",16(B" ",1~(B"
-"u" ",1z(B" ",1|(B" ",1{(B" ",1y(B" ",1x(B"
-",1_(B" ",1Q(B" ",1X(B" ",1f(B" ",1W(B" ",1q(B"
-"y" ",1}(B" ",1V(B" ",1[(B" ",1O(B" ",1\(B"
-
-"A" ",2`(B" ",2d(B" ",2c(B" ",2a(B" ",2U(B"
-",2e(B" ",2"(B" ",2F(B" ",2G(B" ",2!(B" ",2#(B" 
-",2b(B" ",2%(B" ",2&(B" ",2g(B" ",2$(B" ",2'(B" 
-"E" ",2h(B" ",2k(B" ",2((B" ",2i(B" ",2)(B" 
-",2j(B" ",2+(B" ",2,(B" ",2-(B" ",2*(B" ",2.(B" 
-"I" ",2l(B" ",2o(B" ",2n(B" ",2m(B" ",28(B"
-"O" ",2r(B" ",2v(B" ",2u(B" ",2s(B" ",2w(B"
-",2t(B" ",20(B" ",21(B" ",22(B" ",2/(B" ",25(B"
-",2=(B" ",26(B" ",27(B" ",2^(B" ",2>(B" ",2~(B" 
-"U" ",2y(B" ",2|(B" ",2{(B" ",2z(B" ",2x(B" 
-",2_(B" ",2W(B" ",2X(B" ",2f(B" ",2Q(B" ",2q(B"
-"Y" ",2O(B" ",2V(B" ",2[(B" ",2}(B" ",2\(B" 
-
-",2p(B" ",1p(B"
\ No newline at end of file
Index: egg-util.el
===================================================================
RCS file: egg-util.el
diff -N egg-util.el
--- egg-util.el	27 Jan 2001 18:46:05 -0000	1.1.1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,62 +0,0 @@
-;;; egg-util.el --- Utilities with Egg
-
-;; Copyright (C) 2000 ElectroTechinical Laboratory, Japan
-;; Copyright (C) 2000 TOMURA Satoru <tomura@etl.go.jp>
-
-;; Author: TOMURA Satoru <tomura@etl.go.jp>
-
-;; Maintainer: TOMURA Satoru <tomura@etl.go.jp>
-
-;; Keywords: mule, multilingual, input method
-
-;; This file is part of EGG.
-
-;; EGG is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; EGG is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;; Commentary:
-
-;;; Code:
-
-(provide 'egg-util)
-
-(defun add-directory-to-load-path (dir)
-  (let ((dir (expand-file-name dir)))
-    (add-to-list 'load-path dir)
-    (let ((default-directory dir))
-      (normal-top-level-add-subdirs-to-load-path))))
-
-(defun locate-libraries (library &optional nosuffix path interactive-call)
-  (let ((lpath (or path load-path))
-	(result nil))
-    (while lpath
-      (let ((path (locate-library library nosuffix lpath interactive-call)))
-	(if path
-	    (progn
-	      (setq lpath (cdr-safe 
-			   (member (directory-file-name (file-name-directory path))
-				   lpath))
-		    result (cons path result)))
-	  (progn
-	    (setq lpath nil
-		  result (reverse result))))))
-    result))
-
-(defun load-libraries (library &optional path)
-  (let ((files (locate-libraries library nil (or path load-path) nil)))
-    (while files
-      (load-file (car files))
-      (setq files (cdr files)))))
-
Index: egg-x0213.el
===================================================================
RCS file: egg-x0213.el
diff -N egg-x0213.el
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ egg-x0213.el	1 Dec 2001 09:42:24 -0000	1.1
@@ -0,0 +1,111 @@
+;;; jisx0213.el --- Charset Definition for JIS X 0213
+
+;; Copyright (C) 1999,2000 PFU LIMITED
+
+;; Author: KATAYAMA Yoshio <kate@pfu.co.jp>
+
+;; Maintainer: TOMURA Satoru <tomura@etl.go.jp>
+
+;; Keywords: mule, multilingual, input method
+
+;; This file is part of EGG.
+
+;; EGG is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; EGG is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; This module defines JIS X 0213 character sets if these character
+;; sets are not defined.  This module also defines fixed-euc-jisx0213
+;; coding systems if these coding systems are not defined and can be
+;; defined.
+
+;;; Code:
+
+(if (not (charsetp 'japanese-jisx0213-1))
+    (define-charset 151 'japanese-jisx0213-1
+      [2 94 2 0 ?O 0 "JISX0213-1" "JISX0213-1" "JISX0213-1 (Japanese)"]))
+
+(if (not (charsetp 'japanese-jisx0213-2))
+    (define-charset 254 'japanese-jisx0213-2
+      [2 94 2 0 ?P 0 "JISX0213-2" "JISX0213-2" "JISX0213-2 (Japanese)"]))
+
+;; Mule-UCS is required to adopt fixed-euc-jisx0213.
+(or 
+ noninteractive ;; unnecessary in non-interactive mode.
+ (unless (or (require 'jisx0213)
+             (get 'jisx0213-to-jisx0208/0212 'translation-table))
+   (message "Mule-UCS not installed."))
+ (coding-system-p 'fixed-euc-jisx0213)
+ (progn
+
+   (define-ccl-program ccl-decode-fixed-euc-jisx0213
+     `(2
+       ((r3 = ,(charset-id 'katakana-jisx0201))
+        (loop ;;      ascii kana 212 208
+         (read r0) ;; r0 -   0    0    h   h
+         (read r1) ;; r1 -   l    h    l   h
+         (if (r0 < ?\x80)
+             ((if (r1 < ?\x80)
+                  (write-repeat r1))
+              (write r3)
+              (write-repeat r1))
+           ((r0 &= 127)
+            (r0 <<= 7)
+            (if (r1 > ?\x80)
+                ((r1 &= 127)
+                 (r2 = ,(charset-id 'japanese-jisx0213-1)))
+              (r2 = ,(charset-id 'japanese-jisx0213-2)))
+            (r0 += r1)
+            (translate-character jisx0213-to-jisx0208/0212 r2 r0)
+            (write-multibyte-character r2 r0)
+            (repeat)
+            ))))))
+
+   (define-ccl-program ccl-encode-fixed-euc-jisx0213
+     `(2
+       ((loop
+         (read-multibyte-character r0 r1)
+         (r6 = (r0 == ,(charset-id 'ascii))) ;G0
+         (r6 |= (r0 == ,(charset-id 'latin-jisx0201)))
+         (if r6
+             ((write 0)
+              (write-repeat r1)))
+         (r6 = (r0 == ,(charset-id 'japanese-jisx0208)))
+         (r6 |= (r0 == ,(charset-id 'japanese-jisx0208-1978)))
+         (r6 |= (r0 == ,(charset-id 'japanese-jisx0213-1)))
+         (if r6                         ;G1
+             ((r2 = (r1 >> 7))
+              (write (r2 | ?\x80))
+              (write ((r1 & ?\x7f) | ?\x80))
+              (repeat)))
+         (if (r0 == ,(charset-id 'katakana-jisx0201)) ;G2
+             ((write 0)
+              (write (r1 | ?\x80))
+              (repeat)))
+         (r6 = (r0 == ,(charset-id 'japanese-jisx0212))) ;G3
+         (r6 |= (r0 == ,(charset-id 'japanese-jisx0213-2)))
+         (if r6
+             ((r2 = (r1 >> 7))
+              (write (r2 | ?\x80))
+              (write (r1 & ?\x7f))
+              (repeat)))
+         (repeat)))))
+
+   (make-coding-system 
+    'fixed-euc-jisx0213 4 ?W "Coding System for fixed EUC Japanese"
+    (cons ccl-decode-fixed-euc-jisx0213 ccl-encode-fixed-euc-jisx0213))))
+
+(provide 'egg-x0213)
Index: egg.el
===================================================================
RCS file: /cvs/tamago/tamago/egg.el,v
retrieving revision 1.1.1.3
retrieving revision 1.5
diff -d -u -p -r1.1.1.3 -r1.5
--- egg.el	27 Jan 2001 18:46:59 -0000	1.1.1.3
+++ egg.el	22 Jul 2002 13:18:56 -0000	1.5
@@ -30,13 +30,19 @@
 
 ;;; Code:
 
-(require 'cl)
+(defconst egg-version "4.0.6"
+  "Version number for this version of Tamago.")
+
+(eval-when-compile
+  (require 'cl))
+
 (require 'egg-edep)
 
-(autoload 'egg-simple-input-method "egg-sim")
+(autoload 'egg-simple-input-method "egg-sim"
+  "simple input method for Tamago 4." t)
 
 (defgroup egg nil
-  "Tamago Version 4")
+  "Tamago Version 4.")
 
 (defcustom egg-mode-preference t
   "*Make Egg as modefull input method, if non-NIL."
@@ -44,13 +50,89 @@
 
 (defvar egg-default-language)
 
-(defvar egg-last-method-name)
+(defvar egg-last-method-name nil)
 (make-variable-buffer-local 'egg-last-method-name)
 (put 'egg-last-method-name 'permanent-local t)
 
-(defvar egg-current-keymap nil)
-(make-variable-buffer-local 'egg-current-keymap)
-(put 'egg-current-keymap 'permanent-local t)
+(defvar egg-mode-map-alist nil)
+(defvar egg-sub-mode-map-alist nil)
+
+(defmacro define-egg-mode-map (mode &rest initializer)
+  (let ((map (intern (concat "egg-" (symbol-name mode) "-map")))
+	(var (intern (concat "egg-" (symbol-name mode) "-mode")))
+	(comment (concat (symbol-name mode) " keymap for EGG mode.")))
+    `(progn
+       (defvar ,map (let ((map (make-sparse-keymap)))
+		      ,@initializer
+		      map)
+	 ,comment)
+       (fset ',map ,map)
+       (defvar ,var nil)
+       (make-variable-buffer-local ',var)
+       (put ',var 'permanent-local t)
+       (or (assq ',var egg-mode-map-alist)
+	   (setq egg-mode-map-alist (append egg-mode-map-alist
+					    '((,var . ,map))))))))
+
+(define-egg-mode-map modefull
+  (define-key map "\C-^" 'egg-simple-input-method)
+  (let ((i 33))
+    (while (< i 127)
+      (define-key map (vector i) 'egg-self-insert-char)
+      (setq i (1+ i)))))
+
+(define-egg-mode-map modeless
+  (define-key map " " 'mlh-space-bar-backward-henkan)
+  (define-key map "\C-^" 'egg-simple-input-method))
+
+(defvar egg-enter/leave-fence-hook nil)
+
+(defun egg-enter/leave-fence (&optional old new)
+  (run-hooks 'egg-enter/leave-fence-hook))
+
+(defvar egg-activated nil)
+(make-variable-buffer-local 'egg-activated)
+(put 'egg-activated 'permanent-local t)
+
+(defun egg-activate-keymap ()
+  (when (and egg-activated
+	     (null (eq (car egg-sub-mode-map-alist)
+		       (car minor-mode-overriding-map-alist))))
+    (let ((alist (append egg-sub-mode-map-alist egg-mode-map-alist))
+	  (overriding (copy-sequence minor-mode-overriding-map-alist)))
+      (while alist
+	(setq overriding (delq (assq (caar alist) overriding) overriding)
+	      alist (cdr alist)))
+      (setq minor-mode-overriding-map-alist (append egg-sub-mode-map-alist
+						    overriding
+						    egg-mode-map-alist)))))
+
+(add-hook 'egg-enter/leave-fence-hook 'egg-activate-keymap t)
+
+(defun egg-modify-fence (&rest arg)
+  (add-hook 'post-command-hook 'egg-post-command-func))
+
+(defun egg-post-command-func ()
+  (run-hooks 'egg-enter/leave-fence-hook)
+  (remove-hook 'post-command-hook 'egg-post-command-func))
+
+(defvar egg-change-major-mode-buffer nil)
+
+(defun egg-activate-keymap-after-command ()
+  (while egg-change-major-mode-buffer
+    (save-excursion
+      (when (buffer-live-p (car egg-change-major-mode-buffer))
+	(set-buffer (car egg-change-major-mode-buffer))
+	(egg-activate-keymap))
+      (setq egg-change-major-mode-buffer (cdr egg-change-major-mode-buffer))))
+  (remove-hook 'post-command-hook 'egg-activate-keymap-after-command))
+
+(defun egg-change-major-mode-func ()
+  (setq egg-change-major-mode-buffer (cons (current-buffer)
+					   egg-change-major-mode-buffer))
+  (add-hook 'post-command-hook 'egg-activate-keymap-after-command))
+
+(add-hook 'change-major-mode-hook 'egg-change-major-mode-func)
 
 ;;;###autoload
 (defun egg-mode (&rest arg)
@@ -64,9 +146,9 @@
 	  (progn
 	    (its-exit-mode)
 	    (egg-exit-conversion))
-	(setq describe-current-input-method-function nil)
-	(if (eq (current-local-map) egg-current-keymap)
-	    (use-local-map (keymap-parent (current-local-map))))
+	(setq describe-current-input-method-function nil
+	      egg-modefull-mode nil
+	      egg-modeless-mode nil)
 	(remove-hook 'input-method-activate-hook 'its-set-mode-line-title t)
 	(force-mode-line-update))
     ;; Turn on
@@ -77,11 +159,14 @@
     (egg-set-conversion-backend (nthcdr 2 arg))
     (egg-set-conversion-backend
      (list (assq its-current-language (nthcdr 2 arg))) t)
-    (setq egg-last-method-name (car arg))
-    (setq egg-current-keymap (if egg-mode-preference
-				 (egg-modefull-map)
-			       (egg-modeless-map)))
-    (use-local-map egg-current-keymap)
+    (setq egg-last-method-name (car arg)
+	  egg-activated t)
+    (egg-activate-keymap)
+    (if egg-mode-preference
+	(progn
+	  (setq egg-modefull-mode t)
+	  (its-define-select-keys egg-modefull-map))
+      (setq egg-modeless-mode t))
     (setq inactivate-current-input-method-function 'egg-mode)
     (setq describe-current-input-method-function 'egg-help)
     (make-local-hook 'input-method-activate-hook)
@@ -95,43 +180,44 @@
   (if (<= (minibuffer-depth) 1)
       (remove-hook 'minibuffer-exit-hook 'egg-exit-from-minibuffer)))
 
-(defun egg-modefull-map ()
-  "Generate modefull keymap for EGG mode."  
-  (let ((map (make-sparse-keymap))
-	(i 33))
-    (define-key map "\C-^" 'egg-simple-input-method)
-    (while (< i 127)
-      (define-key map (vector i) 'egg-self-insert-char)
-      (setq i (1+ i)))
-    (its-define-select-keys map)
-    (set-keymap-parent map (current-local-map))
-    map))
-
-(defun egg-modeless-map ()
-  "Generate modeless keymap for EGG mode."
-  (let ((map (make-sparse-keymap)))
-    (define-key map " " 'mlh-space-bar-backward-henkan)
-    (define-key map "\C-^" 'egg-simple-input-method)
-    (set-keymap-parent map (current-local-map))
-    map))
-
 (defvar egg-context nil)
 
 (defun egg-self-insert-char ()
   (interactive)
   (its-start last-command-char (and (eq last-command 'egg-use-context)
 				    egg-context)))
+
+(defun egg-remove-all-text-properties (from to &optional object)
+  (let ((p from)
+	props prop)
+    (while (< p to)
+      (setq prop (text-properties-at p object))
+      (while prop
+	(unless (eq (car prop) 'composition)
+	  (setq props (plist-put props (car prop) nil)))
+	(setq prop (cddr prop)))
+      (setq p (next-property-change p object to)))
+    (remove-text-properties from to props object)))
+
+(defun egg-setup-invisibility-spec ()
+  (if (listp buffer-invisibility-spec)
+      (unless (condition-case nil (memq 'egg buffer-invisibility-spec) (error))
+	(setq buffer-invisibility-spec (cons 'egg buffer-invisibility-spec)))
+    (unless (eq buffer-invisibility-spec t)
+      (setq buffer-invisibility-spec (list 'egg buffer-invisibility-spec)))))
 
 (defvar egg-mark-list nil)
 (defvar egg-suppress-marking nil)
 
 (defun egg-set-face (beg eng face &optional object)
-  (put face 'face face)
-  (add-text-properties beg eng
-		       (list 'category face
-			     'egg-face t
-			     'modification-hooks '(egg-mark-modification))
-		       object))
+  (let ((hook (get-text-property beg 'modification-hooks object)))
+    (put face 'face face)
+    (add-text-properties beg eng
+			 (list 'category face
+			       'egg-face t
+			       'modification-hooks (cons 'egg-mark-modification
+							 hook))
+			 object)))
 
 (defun egg-mark-modification (beg end)
   (if (and (null egg-suppress-marking)
@@ -262,7 +348,7 @@
 	(funcall auto-fill-function)
 	(while (and (< fill-column (current-column))
 		    (< (current-column) ocolumn))
-  	  (setq ocolumn (current-column))
+	  (setq ocolumn (current-column))
 	  (funcall auto-fill-function)))))
 
 (eval-when (eval load)
Index: eggrc
===================================================================
RCS file: /cvs/tamago/tamago/eggrc,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -d -u -p -r1.1.1.1 -r1.3
--- eggrc	27 Jan 2001 18:45:24 -0000	1.1.1.1
+++ eggrc	22 Jul 2002 13:18:56 -0000	1.3
@@ -1,4 +1,4 @@
-;;; eggrc --- EGG Input Method Startup File
+;;; eggrc --- EGG Input Method Startup File -*- emacs-lisp -*-
 
 ;; Copyright (C) 1999, 2000 Free Software Foundation, Inc
 
@@ -107,6 +107,93 @@
   (wnn-add-dict '("ud") "" 15 t t)
   (wnn-set-param  2 10 2 45 1 80 5 1 50 -20 400 -10  100  -100 200 0 200))
 
+(defun wnn7-jserver-setup ()
+  (wnn-define-environment nil)
+  (wnn-set-fuzokugo "system/kougo.fzk")
+  (wnn-add-fisys-dict "system/fisd" '("fisd.h") t)
+  (wnn-add-fiusr-dict '("fiud") nil t nil)
+
+  (wnn-add-dict "system/kihon.dic"        '("kihon.h")       6 nil t)
+  (wnn-add-dict "system/symbol.dic"       '("symbol.h")      1 nil t)
+  (wnn-add-dict "system/symbol_noat.dic"  '("symbol_noat.h") 1 nil t)
+  (wnn-add-dict "system/tel.dic"          '("tel.h")         1 nil t)
+  (wnn-add-dict "system/zip.dic"          '("zip.h")         1 nil t)
+  (wnn-add-dict "system/tankan.dic"       nil                1 nil nil)
+  (wnn-add-dict "system/tankan2.dic"      nil                1 nil nil)
+  (wnn-add-dict "system/ikeiji.dic"       nil                1 nil nil)
+  (wnn-add-dict "system/rensou.dic"       nil                1 nil nil)
+  (wnn-add-dict '("ud")                   nil               15 t   t)
+
+  (wnn-add-dict "option/jinmei.dic"       '("jinmei.h")      1 nil t)
+  (wnn-add-dict "option/chimei.dic"       '("chimei.h")      1 nil t)
+  (wnn-add-dict "option/address.dic"      '("address.h")     1 nil t)
+  (wnn-add-dict "option/station.dic"      '("station.h")     1 nil t)
+  (wnn-add-dict "option/kana_english.dic" '("kana_english.h")1 nil t)
+  (wnn-add-dict "option/enterprise.dic"   '("enterprise.h")  1 nil t)
+  (wnn-add-dict "option/airport.dic"      '("airport.h")     1 nil t)
+  (wnn-add-dict "option/university.dic"   '("university.h")  1 nil t)
+  (wnn-add-dict "option/zoo.dic"          '("zoo.h")         1 nil t)
+  (wnn-add-dict "option/botanical_garden.dic" '("botanical_garden.h") 1 nil t)
+  (wnn-add-dict "option/aquarium.dic"     '("aquarium.h")    1 nil t)
+  (wnn-add-dict "option/conveni.dic"      '("conveni.h")     1 nil t)
+  (wnn-add-dict "option/amusement.dic"    '("amusement.h")   1 nil t)
+
+  (wnn-set-param  5 10 2 45 0  80 5 1 20  0 400 -100 400   80 200 2 200)
+
+  (wnn-add-notrans-dict '("katakana") 15 t)
+  (wnn-add-bmodify-dict '("bunsetsu") 15 t)
+
+  (wnn-set-last-is-first-mode t)
+  (wnn-set-complex-conv-mode nil)
+  ;; (wnn-set-okuri-flag -1)
+  (wnn-set-prefix-flag 0)
+
+  (wnn-set-okuri-learn-mode t)
+  (wnn-set-prefix-learn-mode t)
+  (wnn-set-suffix-learn-mode t)
+  (wnn-set-common-learn-mode t)
+  (wnn-set-yuragi-mode nil)
+
+  (wnn-set-freq-func-mode 4)
+
+;;  (wnn-set-yosoku-learn t)
+;;  (wnn-set-yosoku-max-disp 10)
+;;  (wnn-set-yosoku-last-is-first t)
+
+;;  (wnn-set-boin-kabusoku t)
+;;  (wnn-set-shiin-choka t)
+;;  (wnn-set-n-choka t)
+;;  (wnn-set-nihongo-kosei t)
+
+  ;; (wnn-set-numeric-mode -12)
+  ;; (wnn-set-alphabet-mode -30)
+  ;; (wnn-set-symbol-mode -40)
+
+  (wnn-define-environment t)
+  (wnn-set-fuzokugo "system/kougo.fzk")
+  (wnn-add-dict "system/kihonR.dic" nil 1 nil nil)
+  (wnn-add-dict "system/telR.dic" nil 1 nil nil)
+  (wnn-add-dict "system/zipR.dic" nil 1 nil nil)
+  (wnn-add-dict "system/tankanR.dic" nil 1 nil nil)
+  (wnn-add-dict "system/tankan2R.dic" nil 1 nil nil)
+
+  (wnn-add-dict "option/jinmeiR.dic" nil 1 nil nil)
+  (wnn-add-dict "option/chimeiR.dic" nil 1 nil nil)
+  (wnn-add-dict "option/addressR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/stationR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/kana_englishR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/enterpriseR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/airportR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/universityR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/zooR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/botanical_gardenR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/aquariumR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/conveniR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/amusementR.dic" nil 1 nil nil)
+
+  (wnn-add-dict '("ud") nil 15 t t)
+  (wnn-set-param  2 10 2 45 1 80 5 1 50 -20 400 -10  100  -100 200 0 200))
+
 (cond
  ((eq egg-backend-type 'wnn)
   (cond
@@ -186,11 +273,15 @@
     (wnn-add-dict '("ud")                nil             2 t   t)
     (wnn-set-param 2 5 2 45 200 80 5 1 40 0 400 -100 400 80 200 2 200))))
 
- ((eq egg-backend-type 'sj3)
-;  (sj3-set-default-sys-dic-directory "/usr/sony/dict/sj3")
-;  (sj3-set-default-usr-dic-directory "/usr/sony/dict/sj3/user/$USER")
+ ((eq egg-backend-type 'canna)
 
-  (sj3-setsysdic "sj3main.dic")
+  (canna-define-environment)
+  (canna-add-dict "iroha" nil)
+  (canna-add-dict "fuzokugo" nil)
+  (canna-add-dict "hojomwd" nil)
+  (canna-add-dict "hojoswd" nil)
+  (canna-add-dict "user" t)
 
-  (sj3-setusrdic "private.dic")
-  (sj3-setusrstdy "study.dat")))
+  (canna-define-environment "Bushu" 0 t)
+  (canna-add-dict "bushu" nil))
+ )
Index: its-keydef.el
===================================================================
RCS file: /cvs/tamago/tamago/its-keydef.el,v
retrieving revision 1.1.1.2
retrieving revision 1.3
diff -d -u -p -r1.1.1.2 -r1.3
--- its-keydef.el	27 Jan 2001 18:45:56 -0000	1.1.1.2
+++ its-keydef.el	22 Jul 2002 13:18:56 -0000	1.3
@@ -43,6 +43,7 @@
 
 (defvar its-select-alist nil)
 (make-variable-buffer-local 'its-select-func-alist)
+(setq-default its-select-func-alist nil)
 (put 'its-select-alist 'permanent-local t)
 
 (defvar its-select-func-default-alist nil)
@@ -70,7 +71,7 @@
 	     ((its-in-fence-p)
 	      (its-input-end)
 	      (its-put-cursor t))
-	     ((egg-get-bunsetsu-info (point))
+	     ((egg-conversion-fence-p)
 	      (egg-exit-conversion)))
 	    (setq its-current-select-func func
 		  its-current-map ',map
Index: its.el
===================================================================
RCS file: /cvs/tamago/tamago/its.el,v
retrieving revision 1.1.1.4
retrieving revision 1.5
diff -d -u -p -r1.1.1.4 -r1.5
--- its.el	27 Jan 2001 18:46:58 -0000	1.1.1.4
+++ its.el	2 Aug 2002 02:36:28 -0000	1.5
@@ -31,11 +31,13 @@
 
 ;;; Code:
 
-(require 'cl)
+(eval-when-compile
+  (require 'cl))
+
 (require 'egg-edep)
 
 (defgroup its nil
-  "Input Translation System of Tamagotchy"
+  "Input Translation System of Tamago 4."
   :group 'egg)
 
 (defcustom its-enable-fullwidth-alphabet t
@@ -47,7 +49,13 @@
   :group 'its :type 'boolean)
 
 (defcustom its-delete-by-keystroke nil
-  "*Delete characters as if cancel input keystroke, if nin-NIL."
+  "*Delete characters as if cancel input keystroke, if nin-NIL.
+This variable is overriden by `its-delete-by-character'."
+  :group 'its :type 'boolean)
+
+(defcustom its-delete-by-character nil
+  "*Delete a character as a unit even if just after input, if nin-NIL.
+This variable override `its-delete-by-keystroke'."
   :group 'its :type 'boolean)
 
 (defcustom its-fence-invisible nil
@@ -93,7 +101,7 @@
 (make-variable-buffer-local 'its-previous-select-func)
 (put 'its-previous-select-func 'permanent-local t)
 
-(defvar its-current-language)
+(defvar its-current-language nil)
 (make-variable-buffer-local 'its-current-language)
 (put 'its-current-language 'permanent-local t)
 
@@ -194,8 +202,15 @@
 (defsubst its-kst-p (kst/t)
   (not (or (numberp kst/t) (null kst/t))))
 
-(defsubst its-get-output (syl/state)
-  (car syl/state))
+(defun its-get-output (syl/state &optional no-eval)
+  (setq syl/state (car syl/state))
+  (cond ((null (consp syl/state))
+	 syl/state)
+	((and (null no-eval) (eq (car syl/state) 'eval))
+	 (eval (mapcar (lambda (s) (if (stringp s) (copy-sequence s) s))
+		       (cdr syl/state))))
+	(t
+	 (copy-sequence syl/state))))
 
 (defsubst its-set-output (state output)
   (setcar state output))
@@ -232,7 +247,7 @@
   (if (consp (cdr syl))
       (cons (its-get-output syl) (its-get-keyseq-syl syl))
     syl))
-    
+
 ;;
 ;;
 
@@ -260,8 +275,8 @@
     (define-key map "\M-y" 'its-yank-pop)
     (define-key map [backspace] 'its-delete-backward-SYL)
     (define-key map [delete] 'its-delete-backward-SYL)
-    (define-key map [M-backspace] 'its-delete-backward-SYL-by-keystroke)
-    (define-key map [M-delete] 'its-delete-backward-SYL-by-keystroke)
+    (define-key map [(meta backspace)] 'its-delete-backward-SYL-by-keystroke)
+    (define-key map [(meta delete)] 'its-delete-backward-SYL-by-keystroke)
     (define-key map [right] 'its-forward-SYL)
     (define-key map [left] 'its-backward-SYL)
     (while (< i 127)
@@ -274,13 +289,26 @@
     (define-key map "\M-n" 'its-next-map)
     (define-key map "\M-h" 'its-hiragana) ; hiragana-region for input-buffer
     (define-key map "\M-k" 'its-katakana)
-    (define-key map "\M-<" 'its-hankaku)
-    (define-key map "\M->" 'its-zenkaku)
+    (define-key map "\M-<" 'its-half-width)
+    (define-key map "\M->" 'its-full-width)
     map)
   "Keymap for ITS mode.")
-
 (fset 'its-mode-map its-mode-map)
 
+(defvar its-fence-mode nil)
+(make-variable-buffer-local 'its-fence-mode)
+(put 'its-fence-mode 'permanent-local t)
+
+(defvar egg-sub-mode-map-alist nil)
+(or (assq 'its-fence-mode egg-sub-mode-map-alist)
+    (setq egg-sub-mode-map-alist (cons '(its-fence-mode . its-mode-map)
+				       egg-sub-mode-map-alist)))
+
+(defun its-enter/leave-fence (&optional old new)
+  (setq its-fence-mode (its-in-fence-p)))
+
+(add-hook 'egg-enter/leave-fence-hook 'its-enter/leave-fence)
+
 (defconst its-setup-fence-before-insert-SYL nil)
 
 (defun its-get-fence-face (lang)
@@ -290,17 +318,19 @@
 	     (assq t its-fence-face)))))
 
 (defun its-put-cursor (cursor)
-  (if (null (eq its-barf-on-invalid-keyseq 'its-keyseq-test))
-      (let ((p (point))
-	    (str (copy-sequence "!")))
-	(set-text-properties 0 1 (list 'local-map 'its-mode-map
-				       'read-only t
-				       'invisible t
-				       'intangible 'its-part-2
-				       'its-cursor cursor)
-			     str)
-	(insert str)
-	(goto-char p))))
+  (unless (eq its-barf-on-invalid-keyseq 'its-keyseq-test)
+    (let ((p (point))
+	  (str (copy-sequence "!")))
+      (set-text-properties 0 1 (list 'read-only          t
+				     'invisible          'egg
+				     'intangible         'its-part-2
+				     'its-cursor         cursor
+				     'point-entered      'egg-enter/leave-fence
+				     'point-left         'egg-enter/leave-fence
+				     'modification-hooks '(egg-modify-fence))
+			   str)
+      (insert str)
+      (goto-char p))))
 
 (defun its-set-cursor-status (cursor)
   (delete-region (point) (1+ (point)))
@@ -330,6 +360,7 @@
 	(error "invalid fence"))
     ;; Put open-fence before inhibit-read-only to detect read-only
     (insert (if its-context its-fence-continue its-fence-open))
+    (egg-setup-invisibility-spec)
     (let ((inhibit-read-only t))
       (setq p1 (point))
       (add-text-properties p p1 open-props)
@@ -338,7 +369,7 @@
       (insert its-fence-close)
       (add-text-properties p1 (point) close-props)
       (if its-fence-invisible
-	  (put-text-property p (point) 'invisible t))
+	  (put-text-property p (point) 'invisible 'egg))
       (put-text-property p (point) 'read-only t)
       (goto-char p1)
       (its-define-select-keys its-mode-map t)
@@ -643,14 +674,14 @@
 	 (add-hook hook func t)
        (funcall func)
        (run-hooks hook)
-       (setq hook nil))))
+       (set hook nil))))
 
 ;; Data structure for map compaction
 ;;  <node> ::= (<count> <node#> <original node>)   ; atom
 ;;          |  (<count> <node#> (<node> . <node>)) ; cons cell
 ;;
 ;;  <count> ::= integer  ; 0 or negative - usage count
-;;                       ; psotive       - generated common sub-tree
+;;                       ; positive      - generated common sub-tree
 ;;
 ;;  <node#> ::= integer  ; subject to compaction
 ;;           |  nil      ; not subject to compaction
@@ -683,9 +714,16 @@
   `(1- (setq its-compaction-list (cons ,node its-compaction-list)
 	     its-compaction-counter-2 (1+ its-compaction-counter-2))))
 
+(defmacro its-concat (&rest args)
+  `(concat ,@(mapcar (lambda (arg)
+		       (if (stringp arg)
+			   arg
+			 `(if (numberp ,arg) (number-to-string ,arg) ,arg)))
+		     args)))
+
 (defmacro its-compaction-hash (name node parent lr type)
   (if (null type)
-      `(let ((hash (intern (concat ,@name) its-compaction-hash-table)))
+      `(let ((hash (intern (its-concat ,@name) its-compaction-hash-table)))
 	 (if (null (boundp hash))
 	     (car (set hash (list* (its-compaction-new-node) ,parent ,lr)))
 	   (setq hash (symbol-value hash))
@@ -696,7 +734,7 @@
 	   (its-compaction-set-lr ,parent ,lr (cdr hash))
 	   (car hash)))
     `(let ((hash ,(if (eq type 'integer)
-		      `(intern (concat ,@name) its-compaction-hash-table)
+		      `(intern (its-concat ,@name) its-compaction-hash-table)
 		    `(aref its-compaction-integer-table (+ ,node 10)))))
        (if (null ,(if (eq type 'integer) '(boundp hash) 'hash))
 	   (setq hash (,@(if (eq type 'integer)
@@ -708,18 +746,24 @@
        (its-compaction-set-lr ,parent ,lr (cdr hash))
        (car hash))))
 
-(defun its-map-compaction-internal (map parent lr)
+(defun its-map-compaction-internal (map parent lr &optional force)
   (cond
-   ((consp map)    (let ((candidate (or (null (stringp (car map))) (cdr map)))
-			 (l (its-map-compaction-internal (car map) map 'car))
-			 (r (its-map-compaction-internal (cdr map) map 'cdr)))
-		     (if (and candidate l r)
-			 (its-compaction-hash (l " " r) map parent lr nil))))
-   ((stringp map)  (its-compaction-hash ("STR" map) map parent lr nil))
-   ((integerp map) (if (and (>= map -10) (< map 128))
-		       (its-compaction-hash nil map parent lr small-int)
-		     (its-compaction-hash ("INT" map) map parent lr integer)))
-   ((null map)     0)))
+   ((consp map)
+    (let* ((candidate (or (null (stringp (car map))) (cdr map)))
+	   (sexp (or force (eq (car map) 'eval)))
+	   (l (its-map-compaction-internal (car map) map 'car sexp))
+	   (r (its-map-compaction-internal (cdr map) map 'cdr sexp)))
+      (if (or sexp (and candidate l r))
+	  (its-compaction-hash (l " " r) map parent lr nil))))
+   ((stringp map)
+    (its-compaction-hash ("STR" map) map parent lr nil))
+   ((integerp map)
+    (if (and (>= map -10) (< map 128))
+	(its-compaction-hash nil map parent lr small-int)
+      (its-compaction-hash ("INT" map) map parent lr integer)))
+   ((null map) 0)
+   ((symbolp map)
+    (its-compaction-hash ("SYM" (symbol-name map)) map parent lr nil))))
 
 (defvar its-map-rebuild-subtrees)
 
@@ -790,7 +834,7 @@ Return last state."
 	(setq state next-state))
        ((null build-if-none)
 	(error "No such state (%s)" input))
-       (t 
+       (t
 	(if (not (or brand-new (= i 1) (its-get-kst/t state)))
 	    (its-set-interim-terminal-state state))
 	(setq state (its-make-next-state state key
@@ -802,7 +846,7 @@ Return last state."
     state))
 
 (defun its-set-interim-terminal-state (state &optional output)
-  (its-make-next-state state -1 (or output (its-get-output state)))
+  (its-make-next-state state -1 (or output (its-get-output state t)))
   (its-defrule-otherwise state output))
 
 (defun its-defoutput (input display)
@@ -975,7 +1019,7 @@ Return last state."
 	(cursor (get-text-property (point) 'its-cursor)))
     (if (null syl)
 	(signal 'beginning-of-buffer nil)
-      (if (eq cursor t)
+      (if (or (eq cursor t) (and cursor its-delete-by-character))
 	  (its-delete-backward-SYL-internal n killflag)
 	(its-delete-backward-within-SYL syl n killflag)))))
 
@@ -1038,7 +1082,7 @@ Return last state."
 	(signal 'beginning-of-buffer nil))
     (delete-region p (point))
     (if (> len n)
-	(its-state-machine-keyseq (substring keyseq 0 (- len n)) 
+	(its-state-machine-keyseq (substring keyseq 0 (- len n))
 				  'its-buffer-ins/del-SYL)
       (its-set-cursor-status
        (if (or (null its-delete-by-keystroke)
@@ -1124,10 +1168,14 @@ Return last state."
     (setq i 0)
     (while (< i len)
       (setq lang (get-text-property i 'egg-lang source))
-      (if (and
-	   (or (eq lang 'Chinese-GB) (eq lang 'Chinese-CNS))
-	   (setq l (egg-chinese-syllable source i)))
-	  (setq j (+ i l))
+      (if (or (and (or (eq lang 'Chinese-GB) (eq lang 'Chinese-CNS))
+		   (setq l (egg-chinese-syllable source i)))
+	      (and (setq l (get-text-property i 'composition source))
+		   (setq l (if (consp (car l)) (caar l) (cadr l)))
+		   (eq (next-single-property-change i 'composition
+						    source (length source))
+		       l)))
+	     (setq j (+ i l))
 	(setq j (+ i (egg-char-bytes (egg-string-to-char-at source i)))))
       (setq syl (substring no-prop-source i j))
       (put-text-property i j 'its-syl (cons syl syl) source)
@@ -1181,7 +1229,7 @@ Return last state."
 
 ;; TODO: handle overwrite-mode, insertion-hook, fill...
 (defun its-exit-mode-internal (&optional proceed-to-conversion n)
-  (let (start end s context)
+  (let (start end s context str)
     (its-select-previous-mode t)
     ;; Delete CURSOR
     (delete-region (point) (1+ (point)))
@@ -1198,9 +1246,10 @@ Return last state."
 	(egg-convert-region start end context n)
       ;; Remove all properties
       (goto-char start)
-      (insert (prog1
-		  (buffer-substring-no-properties start end)
-		(delete-region start end)))
+      (setq str (buffer-substring start end))
+      (egg-remove-all-text-properties 0 (length str) str)
+      (delete-region start end)
+      (insert str)
       (egg-do-auto-fill)
       (run-hooks 'input-method-after-insert-chunk-hook))))
 
@@ -1220,7 +1269,8 @@ Return last state."
       (its-kick-convert-region n))))
 
 (defun its-in-fence-p ()
-  (eq (get-text-property (point) 'intangible) 'its-part-2))
+  (and (eq (get-text-property (point) 'intangible) 'its-part-2)
+       (get-text-property (point) 'read-only)))
 
 (defvar its-translation-result "" "")
 
@@ -1241,7 +1291,7 @@ Return last state."
 (defun its-translate-region (start end)
   (interactive "r")
   (its-translate-region-internal start end)
-  (set-text-properties start (point) nil))
+  (egg-remove-all-text-properties start (point)))
 
 (defun its-translate-region-internal (start end)
   (setq its-translation-result "")
@@ -1300,66 +1350,198 @@ Return last state."
 ;;; its-hiragana : hiragana-region for input-buffer
 (defun its-hiragana ()
   (interactive)
-  (let ((inhibit-read-only t))
-    (its-input-end)
-    (its-set-part-1 (point) (its-search-end))
-    (its-convert 'japanese-hiragana (its-search-beginning) (point))
-    (its-put-cursor t)))
+  (its-convert (lambda (str lang) (japanese-hiragana str))))
 
 ;;; its-katakana : katanaka-region for input-buffer
 (defun its-katakana ()
   (interactive)
-  (let ((inhibit-read-only t))
-    (its-input-end)
-    (its-set-part-1 (point) (its-search-end))
-    (its-convert 'japanese-katakana (its-search-beginning) (point))
-    (its-put-cursor t)))
+  (its-convert (lambda (str lang) (japanese-katakana str))))
 
-;;; its-hankaku : hankaku-region for input-buffer
-(defun its-hankaku ()
-  (interactive)
-  (let ((inhibit-read-only t))
-    (its-input-end)
-    (its-set-part-1 (point) (its-search-end))
-    (its-convert 'its-japanese-hankaku (its-search-beginning) (point))
-    (its-put-cursor t)))
+(defconst its-full-half-table (make-vector 100 nil))
+(defconst its-half-full-table (make-vector 100 nil))
 
-(defun its-japanese-hankaku (obj)
-  (japanese-hankaku obj 'ascii-only))
+(let ((table '((Japanese
+		(?$B!!(B . ?\ ) (?$B!$(B . ?,)  (?$B!%(B . ?.)  (?$B!"(B . ?,)  (?$B!#(B . ?.)
+		(?$B!'(B . ?:)  (?$B!((B . ?\;) (?$B!)(B . ??)  (?$B!*(B . ?!)
+		(?$B!-(B . ?')  (?$B!.(B . ?`)  (?$B!0(B . ?^)  (?$B!2(B . ?_)  (?$B!1(B . ?~)
+		(?$B!<(B . ?-)  (?$B!=(B . ?-)  (?$B!>(B . ?-)
+		(?$B!?(B . ?/)  (?$B!@(B . ?\\) (?$B!A(B . ?~)  (?$B!C(B . ?|)
+		(?$B!F(B . ?`)  (?$B!G(B . ?')  (?$B!H(B . ?\") (?$B!I(B . ?\")
+		(?$B!J(B . ?\() (?$B!K(B . ?\)) (?$B!N(B . ?[)  (?$B!O(B . ?])
+		(?$B!P(B . ?{)  (?$B!Q(B . ?})  (?$B!R(B . ?<)  (?$B!S(B . ?>)
+		(?$B!\(B . ?+)  (?$B!](B . ?-)  (?$B!a(B . ?=)  (?$B!c(B . ?<)  (?$B!d(B . ?>)
+		(?$B!l(B . ?')  (?$B!m(B . ?\") (?$B!o(B . ?\\) (?$B!p(B . ?$)  (?$B!s(B . ?%)
+		(?$B!t(B . ?#)  (?$B!u(B . ?&)  (?$B!v(B . ?*)  (?$B!w(B . ?@)
+		(?$B#0(B . ?0)  (?$B#1(B . ?1)  (?$B#2(B . ?2)  (?$B#3(B . ?3)  (?$B#4(B . ?4)
+		(?$B#5(B . ?5)  (?$B#6(B . ?6)  (?$B#7(B . ?7)  (?$B#8(B . ?8)  (?$B#9(B . ?9)
+		(?$B#A(B . ?A)  (?$B#B(B . ?B)  (?$B#C(B . ?C)  (?$B#D(B . ?D)  (?$B#E(B . ?E)
+		(?$B#F(B . ?F)  (?$B#G(B . ?G)  (?$B#H(B . ?H)  (?$B#I(B . ?I)  (?$B#J(B . ?J)
+		(?$B#K(B . ?K)  (?$B#L(B . ?L)  (?$B#M(B . ?M)  (?$B#N(B . ?N)  (?$B#O(B . ?O)
+		(?$B#P(B . ?P)  (?$B#Q(B . ?Q)  (?$B#R(B . ?R)  (?$B#S(B . ?S)  (?$B#T(B . ?T)
+		(?$B#U(B . ?U)  (?$B#V(B . ?V)  (?$B#W(B . ?W)  (?$B#X(B . ?X)  (?$B#Y(B . ?Y)
+		(?$B#Z(B . ?Z)
+		(?$B#a(B . ?a)  (?$B#b(B . ?b)  (?$B#c(B . ?c)  (?$B#d(B . ?d)  (?$B#e(B . ?e)
+		(?$B#f(B . ?f)  (?$B#g(B . ?g)  (?$B#h(B . ?h)  (?$B#i(B . ?i)  (?$B#j(B . ?j)
+		(?$B#k(B . ?k)  (?$B#l(B . ?l)  (?$B#m(B . ?m)  (?$B#n(B . ?n)  (?$B#o(B . ?o)
+		(?$B#p(B . ?p)  (?$B#q(B . ?q)  (?$B#r(B . ?r)  (?$B#s(B . ?s)  (?$B#t(B . ?t)
+		(?$B#u(B . ?u)  (?$B#v(B . ?v)  (?$B#w(B . ?w)  (?$B#x(B . ?x)  (?$B#y(B . ?y)
+		(?$B#z(B . ?z))
+	       (Chinese-GB
+		(?$A!!(B . ?\ ) (?$A#,(B . ?,)  (?$A#.(B . ?.)  (?$A!"(B . ?,)  (?$A!#(B . ?.)
+		(?$A#:(B . ?:)  (?$A#;(B . ?\;) (?$A#?(B . ??)  (?$A#!(B . ?!)
+		(?$A#`(B . ?`)  (?$A#^(B . ?^)  (?$A#_(B . ?_)  (?$A#~(B . ?~)
+		(?$A!*(B . ?-)
+		(?$A#/(B . ?/)  (?$A#\(B . ?\\) (?$A!+(B . ?~)  (?$A#|(B . ?|)
+		(?$A!.(B . ?`)  (?$A!/(B . ?')  (?$A!0(B . ?\") (?$A!1(B . ?\")
+		(?$A#((B . ?\() (?$A#)(B . ?\)) (?$A#[(B . ?[)  ( ?$A#](B . ?])
+		(?$A#{(B . ?{)  (?$A#}(B . ?})
+		(?$A#+(B . ?+)  (?$A#-(B . ?-)  (?$A#=(B . ?=)  (?$A#<(B . ?<)  (?$A#>(B . ?>)
+		(?$A#'(B . ?')  (?$A#"(B . ?\") (?$A#$(B . ?$)  (?$A#%(B . ?%)
+		(?$A##(B . ?#)  (?$A#&(B . ?&)  (?$A#*(B . ?*)  (?$A#@(B . ?@)
+		(?$A#0(B . ?0)  (?$A#1(B . ?1)  (?$A#2(B . ?2)  (?$A#3(B . ?3)  (?$A#4(B . ?4)
+		(?$A#5(B . ?5)  (?$A#6(B . ?6)  (?$A#7(B . ?7)  (?$A#8(B . ?8)  (?$A#9(B . ?9)
+		(?$A#A(B . ?A)  (?$A#B(B . ?B)  (?$A#C(B . ?C)  (?$A#D(B . ?D)  (?$A#E(B . ?E)
+		(?$A#F(B . ?F)  (?$A#G(B . ?G)  (?$A#H(B . ?H)  (?$A#I(B . ?I)  (?$A#J(B . ?J)
+		(?$A#K(B . ?K)  (?$A#L(B . ?L)  (?$A#M(B . ?M)  (?$A#N(B . ?N)  (?$A#O(B . ?O)
+		(?$A#P(B . ?P)  (?$A#Q(B . ?Q)  (?$A#R(B . ?R)  (?$A#S(B . ?S)  (?$A#T(B . ?T)
+		(?$A#U(B . ?U)  (?$A#V(B . ?V)  (?$A#W(B . ?W)  (?$A#X(B . ?X)  (?$A#Y(B . ?Y)
+		(?$A#Z(B . ?Z)
+		(?$A#a(B . ?a)  (?$A#b(B . ?b)  (?$A#c(B . ?c)  (?$A#d(B . ?d)  (?$A#e(B . ?e)
+		(?$A#f(B . ?f)  (?$A#g(B . ?g)  (?$A#h(B . ?h)  (?$A#i(B . ?i)  (?$A#j(B . ?j)
+		(?$A#k(B . ?k)  (?$A#l(B . ?l)  (?$A#m(B . ?m)  (?$A#n(B . ?n)  (?$A#o(B . ?o)
+		(?$A#p(B . ?p)  (?$A#q(B . ?q)  (?$A#r(B . ?r)  (?$A#s(B . ?s)  (?$A#t(B . ?t)
+		(?$A#u(B . ?u)  (?$A#v(B . ?v)  (?$A#w(B . ?w)  (?$A#x(B . ?x)  (?$A#y(B . ?y)
+		(?$A#z(B . ?z))
+	       (Chinese-CNS
+		(?$(G!!(B . ?\ ) (?$(G!"(B . ?,)  (?$(G!%(B . ?.)  (?$(G!#(B . ?,)  (?$(G!$(B . ?.)
+		(?$(G!((B . ?:)  (?$(G!'(B . ?\;) (?$(G!)(B . ??)  (?$(G!*(B . ?!)
+		(?$(G!k(B . ?')  (?$(G!j(B . ?`)  (?$(G!T(B . ?^)  (?$(G"%(B . ?_)  (?$(G"#(B . ?~)
+		(?$(G"@(B . ?-)
+		(?$(G"_(B . ?/)  (?$(G"`(B . ?\\) (?$(G"a(B . ?/)  (?$(G"b(B . ?\\)
+		(?$(G"D(B . ?~)  (?$(G"^(B . ?|)
+		(?$(G!d(B . ?`)  (?$(G!e(B . ?')
+		(?$(G!h(B . ?\") (?$(G!i(B . ?\") (?$(G!f(B . ?\") (?$(G!g(B . ?\")
+		(?$(G!>(B . ?\() (?$(G!?(B . ?\))
+		(?$(G!F(B . ?[)  (?$(G!G(B . ?])  (?$(G!b(B . ?[)  (?$(G!c(B . ?])
+		(?$(G!B(B . ?{)  (?$(G!C(B . ?})  (?$(G!`(B . ?{)  (?$(G!a(B . ?})
+		(?$(G!R(B . ?<)  (?$(G!S(B . ?>)
+		(?$(G"0(B . ?+)  (?$(G"1(B . ?-)  (?$(G"8(B . ?=)  (?$(G"6(B . ?<)  (?$(G"7(B . ?>)
+		(?$(G"c(B . ?$)  (?$(G"h(B . ?%)
+		(?$(G!l(B . ?#)  (?$(G!m(B . ?&)  (?$(G!n(B . ?*)  (?$(G"i(B . ?@)
+		(?$(G$!(B . ?0)  (?$(G$"(B . ?1)  (?$(G$#(B . ?2)  (?$(G$$(B . ?3)  (?$(G$%(B . ?4)
+		(?$(G$&(B . ?5)  (?$(G$'(B . ?6)  (?$(G$((B . ?7)  (?$(G$)(B . ?8)  (?$(G$*(B . ?9)
+		(?$(G$A(B . ?A)  (?$(G$B(B . ?B)  (?$(G$C(B . ?C)  (?$(G$D(B . ?D)  (?$(G$E(B . ?E)
+		(?$(G$F(B . ?F)  (?$(G$G(B . ?G)  (?$(G$H(B . ?H)  (?$(G$I(B . ?I)  (?$(G$J(B . ?J)
+		(?$(G$K(B . ?K)  (?$(G$L(B . ?L)  (?$(G$M(B . ?M)  (?$(G$N(B . ?N)  (?$(G$O(B . ?O)
+		(?$(G$P(B . ?P)  (?$(G$Q(B . ?Q)  (?$(G$R(B . ?R)  (?$(G$S(B . ?S)  (?$(G$T(B . ?T)
+		(?$(G$U(B . ?U)  (?$(G$V(B . ?V)  (?$(G$W(B . ?W)  (?$(G$X(B . ?X)  (?$(G$Y(B . ?Y)
+		(?$(G$Z(B . ?Z)
+		(?$(G$[(B . ?a)  (?$(G$\(B . ?b)  (?$(G$](B . ?c)  (?$(G$^(B . ?d)  (?$(G$_(B . ?e)
+		(?$(G$`(B . ?f)  (?$(G$a(B . ?g)  (?$(G$b(B . ?h)  (?$(G$c(B . ?i)  (?$(G$d(B . ?j)
+		(?$(G$e(B . ?k)  (?$(G$f(B . ?l)  (?$(G$g(B . ?m)  (?$(G$h(B . ?n)  (?$(G$i(B . ?o)
+		(?$(G$j(B . ?p)  (?$(G$k(B . ?q)  (?$(G$l(B . ?r)  (?$(G$m(B . ?s)  (?$(G$n(B . ?t)
+		(?$(G$o(B . ?u)  (?$(G$p(B . ?v)  (?$(G$q(B . ?w)  (?$(G$r(B . ?x)  (?$(G$s(B . ?y)
+		(?$(G$t(B . ?z))
+	       (Korean
+		(?$(C!!(B . ?\ ) (?$(C#,(B . ?,)  (?$(C#.(B . ?.)
+		(?$(C#:(B . ?:)  (?$(C#;(B . ?\;) (?$(C#?(B . ??)  (?$(C#!(B . ?!)
+		(?$(C!/(B . ?')  (?$(C!.(B . ?`)  (?$(C#^(B . ?^)  (?$(C#_(B . ?_)  (?$(C#~(B . ?~)
+		(?$(C!*(B . ?-)  (?$(C!)(B . ?-)
+		(?$(C#/(B . ?/)  (?$(C!,(B . ?\\) (?$(C!-(B . ?~)  (?$(C#|(B . ?|)
+		(?$(C!.(B . ?`)  (?$(C!/(B . ?')  (?$(C!0(B . ?\") (?$(C!1(B . ?\")
+		(?$(C#((B . ?\() (?$(C#)(B . ?\)) (?$(C#[(B . ?[)  (?$(C#](B . ?])
+		(?$(C#{(B . ?{)  (?$(C#}(B . ?})  (?$(C!4(B . ?<)  (?$(C!5(B . ?>)
+		(?$(C#+(B . ?+)  (?$(C#-(B . ?-)  (?$(C#=(B . ?=)  (?$(C#<(B . ?<)  (?$(C#>(B . ?>)
+		(?$(C#'(B . ?')  (?$(C#"(B . ?\") (?$(C#\(B . ?\\) (?$(C#$(B . ?$)  (?$(C#%(B . ?%)
+		(?$(C##(B . ?#)  (?$(C#&(B . ?&)  (?$(C#*(B . ?*)  (?$(C#@(B . ?@)
+		(?$(C#0(B . ?0)  (?$(C#1(B . ?1)  (?$(C#2(B . ?2)  (?$(C#3(B . ?3)  (?$(C#4(B . ?4)
+		(?$(C#5(B . ?5)  (?$(C#6(B . ?6)  (?$(C#7(B . ?7)  (?$(C#8(B . ?8)  (?$(C#9(B . ?9)
+		(?$(C#A(B . ?A)  (?$(C#B(B . ?B)  (?$(C#C(B . ?C)  (?$(C#D(B . ?D)  (?$(C#E(B . ?E)
+		(?$(C#F(B . ?F)  (?$(C#G(B . ?G)  (?$(C#H(B . ?H)  (?$(C#I(B . ?I)  (?$(C#J(B . ?J)
+		(?$(C#K(B . ?K)  (?$(C#L(B . ?L)  (?$(C#M(B . ?M)  (?$(C#N(B . ?N)  (?$(C#O(B . ?O)
+		(?$(C#P(B . ?P)  (?$(C#Q(B . ?Q)  (?$(C#R(B . ?R)  (?$(C#S(B . ?S)  (?$(C#T(B . ?T)
+		(?$(C#U(B . ?U)  (?$(C#V(B . ?V)  (?$(C#W(B . ?W)  (?$(C#X(B . ?X)  (?$(C#Y(B . ?Y)
+		(?$(C#Z(B . ?Z)
+		(?$(C#a(B . ?a)  (?$(C#b(B . ?b)  (?$(C#c(B . ?c)  (?$(C#d(B . ?d)  (?$(C#e(B . ?e)
+		(?$(C#f(B . ?f)  (?$(C#g(B . ?g)  (?$(C#h(B . ?h)  (?$(C#i(B . ?i)  (?$(C#j(B . ?j)
+		(?$(C#k(B . ?k)  (?$(C#l(B . ?l)  (?$(C#m(B . ?m)  (?$(C#n(B . ?n)  (?$(C#o(B . ?o)
+		(?$(C#p(B . ?p)  (?$(C#q(B . ?q)  (?$(C#r(B . ?r)  (?$(C#s(B . ?s)  (?$(C#t(B . ?t)
+		(?$(C#u(B . ?u)  (?$(C#v(B . ?v)  (?$(C#w(B . ?w)  (?$(C#x(B . ?x)  (?$(C#y(B . ?y)
+		(?$(C#z(B . ?z))))
+      (hash (make-vector 100 nil))
+      lang pair)
+  (while table
+    (setq lang (caar table)
+	  pair (cdar table)
+	  table (cdr table))
+    (while pair
+      (set (intern (char-to-string (caar pair)) its-full-half-table)
+	   (cdar pair))
+      (set (intern (concat (symbol-name lang) (char-to-string (cdar pair)))
+		   its-half-full-table)
+	   (caar pair))
+      (setq pair (cdr pair)))
+    hash))
 
-;;; its-zenkaku : zenkaku-region for input-buffer
-(defun its-zenkaku ()
+;;; its-half-width : half-width-region for input-buffer
+(defun its-half-width ()
   (interactive)
-  (let ((inhibit-read-only t))
-    (its-input-end)
-    (its-set-part-1 (point) (its-search-end))
-    (its-convert 'japanese-zenkaku (its-search-beginning) (point))
-    (its-put-cursor t)))
+  (its-convert
+   (lambda (str lang)
+     (concat (mapcar (lambda (c)
+		       (or (symbol-value (intern-soft (char-to-string c)
+						      its-full-half-table))
+			   c))
+		     (string-to-sequence str 'list))))))
 
-(defun its-convert (func start end)
-  (let* ((goto-start (eq (point) start))
-	 (old-str (buffer-substring start end))
-	 (new-str "")
-	 (len (length old-str))
-	 (p 0)
-	 old new syl q)
-    (while (< p len)
-      (setq q (next-single-property-change p 'its-syl old-str len)
-	    old (substring old-str p q)
-	    new (copy-sequence old))
-      (set-text-properties 0 (- q p) nil new)
-      (setq new (funcall func new))
-      (if (equal new old)
-	  (setq new-str (concat new-str old))
-	(setq syl (cons (copy-sequence new) (copy-sequence new)))
-	(set-text-properties 0 (length new) (text-properties-at 0 old) new)
-	(put-text-property 0 (length new) 'its-syl syl new)
-	(setq new-str (concat new-str new)))
-      (setq p q))
-    (delete-region start end)
-    (insert new-str)
-    (if goto-start
-	(goto-char start))))
+;;; its-full-width : full-width-region for input-buffer
+(defun its-full-width ()
+  (interactive)
+  (its-convert
+   (lambda (str lang)
+     (if (egg-chinese-syllable str 0)
+	 (copy-sequence str)
+       (concat (mapcar (lambda (c)
+			 (or (symbol-value
+			      (intern-soft (concat (symbol-name lang)
+						   (char-to-string c))
+					   its-half-full-table))
+			     c))
+		       (string-to-sequence str 'list)))))))
+
+(defun its-convert (func)
+  (let ((inhibit-read-only t))
+    (unwind-protect
+	(progn
+	  (its-input-end)
+	  (let* ((start (its-search-beginning))
+		 (end (its-search-end))
+		 (old-str (buffer-substring start end))
+		 (len (length old-str))
+		 (p 0)
+		 (new-str ""))
+	    (put-text-property 0 len 'intangible 'its-part-1 old-str)
+	    (while (< p len)
+	      (let* ((prop (text-properties-at p old-str))
+		     (cmp (memq 'composition prop))
+		     (old (its-get-output (plist-get prop 'its-syl)))
+		     (new (funcall func old (plist-get prop 'egg-lang)))
+		     (new-len (length new))
+		     syl)
+		(unless (equal new old)
+		  (when cmp
+		    (if (eq prop cmp)
+			(setq prop (cddr prop))
+		      (setcdr (nthcdr (- (length prop) (length cmp) 1) prop)
+			      (cddr cmp))))
+		  (setq syl (copy-sequence new))
+		  (plist-put prop 'its-syl (cons syl syl)))
+		(add-text-properties 0 new-len prop new)
+		(setq new-str (concat new-str new)
+		      p (+ p (length old)))))
+	    (delete-region start end)
+	    (insert new-str)))
+      (its-put-cursor t))))
 
 (defun its-mode ()
   "\\{its-mode-map}"
@@ -1374,5 +1556,31 @@ Return last state."
     (princ (documentation 'its-mode))
     (help-setup-xref (cons #'help-xref-mode (current-buffer)) (interactive-p))))
 
+;; The `point-left' hook function will never be called in Emacs 21.2.50
+;; when the command `next-line' is used in the last line of a buffer
+;; which isn't terminated with a newline or the command `previous-line'
+;; is used in the first line of a buffer.
+(defun its-next-line (&optional arg)
+  "Go to the end of the line if the line isn't terminated with a newline,
+otherwise run `next-line' as usual."
+  (interactive "p")
+  (if (= (line-end-position) (point-max))
+      (end-of-line)
+    (next-line arg)))
+
+(defun its-previous-line (&optional arg)
+  "Go to the beginning of the line if it is called in the first line of a
+buffer, otherwise run `previous-line' as usual."
+  (interactive "p")
+  (if (= (line-beginning-position) (point-min))
+      (beginning-of-line)
+    (previous-line arg)))
+
+(substitute-key-definition 'next-line 'its-next-line
+			   its-mode-map global-map)
+(substitute-key-definition 'previous-line 'its-previous-line
+			   its-mode-map global-map)
+
 (provide 'its)
-;;; its.el ends here.
+
+;;; its.el ends here
Index: jisx0213.el
===================================================================
RCS file: jisx0213.el
diff -N jisx0213.el
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ jisx0213.el	9 Jul 2001 14:46:38 -0000	1.2
@@ -0,0 +1,39 @@
+;;; jisx0213.el --- Charset Definition for JIS X 0213
+
+;; Copyright (C) 1999,2000 PFU LIMITED
+
+;; Author: KATAYAMA Yoshio <kate@pfu.co.jp>
+
+;; Maintainer: TOMURA Satoru <tomura@etl.go.jp>
+
+;; Keywords: mule, multilingual, input method
+
+;; This file is part of EGG.
+
+;; EGG is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; EGG is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+
+;;; Code:
+
+(unless (charsetp 'japanese-jisx0213-1)
+  (define-charset 151 'japanese-jisx0213-1
+    [2 94 2 0 ?O 0 "JISX0213-1" "JISX0213-1" "JISX0213-1 (Japanese)"]))
+
+(unless (charsetp 'japanese-jisx0213-2)
+  (define-charset 254 'japanese-jisx0213-2
+    [2 94 2 0 ?P 0 "JISX0213-2" "JISX0213-2" "JISX0213-2 (Japanese)"]))
Index: leim-list.el
===================================================================
RCS file: /cvs/tamago/tamago/leim-list.el,v
retrieving revision 1.1.1.3
retrieving revision 1.3
diff -d -u -p -r1.1.1.3 -r1.3
--- leim-list.el	27 Jan 2001 18:46:16 -0000	1.1.1.3
+++ leim-list.el	23 Aug 2002 07:46:38 -0000	1.3
@@ -1,8 +1,8 @@
 ;;; leim-list.el --- Egg setup for leim API
 
-;; Copyright (C) 1999, 2000 Free Software Foundation, Inc
+;; Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc
 
-;; Author: NIIBE Yutaka <gniibe@chroot.org>
+;; Author: NIIBE Yutaka <gniibe@m17n.org>
 ;;         KATAYAMA Yoshio <kate@pfu.co.jp>
 ;;         TOMURA Satoru <tomura@etl.go.jp>
 
@@ -31,61 +31,74 @@
 
 ;;; Code:
 
-(when site-run-file
-  (autoload 'egg-activate-wnn "egg/wnn" "Activate Wnn backend of Tamagotchy." t)
-  (autoload 'egg-activate-sj3 "egg/sj3" "Activate SJ3 backend of Tamagotchy." t)
+(autoload 'egg-activate-anthy "egg/anthy"
+  "Activate ANTHY  backend of Tamago 4." t)
+(autoload 'egg-activate-wnn "egg/wnn" "Activate Wnn backend of Tamago 4." t)
+(autoload 'egg-activate-sj3 "egg/sj3" "Activate SJ3 backend of Tamago 4." t)
+(autoload 'egg-activate-canna "egg/canna"
+  "Activate CANNA backend of Tamago 4." t)
 
-  (register-input-method
-   "japanese-egg-wnn" "Japanese" 'egg-activate-wnn
-   "$B$"(B.."  "Romaji -> Hiragana -> Kanji&Kana"
-   'its-select-hiragana)
+(register-input-method
+ "japanese-egg-anthy" "Japanese" 'egg-activate-anthy
+ "$B$"(B.."  "Romaji -> Hiragana -> Kanji&Kana"
+ 'its-select-hiragana)
 
-  (register-input-method
-   "japanese-egg-sj3" "Japanese" 'egg-activate-sj3
-   "$B$"(B.."  "Romaji -> Hiragana -> Kanji&Kana"
-   'its-select-hiragana)
+(register-input-method
+ "japanese-egg-wnn" "Japanese" 'egg-activate-wnn
+ "$B$"(B.."  "Romaji -> Hiragana -> Kanji&Kana"
+ 'its-select-hiragana)
 
-  (register-input-method
-   "chinese-gb-egg-wnn-py" "Chinese-GB" 'egg-activate-wnn
-   "$AF4(BG"  "Pinyin -> Simplified Hanzi"
-   'its-select-pinyin-cn)
+(register-input-method
+ "japanese-egg-sj3" "Japanese" 'egg-activate-sj3
+ "$B$"(B.."  "Romaji -> Hiragana -> Kanji&Kana"
+ 'its-select-hiragana)
 
-  (register-input-method
-   "chinese-gb-egg-wnn-zy" "Chinese-GB" 'egg-activate-wnn
-   "$AW"(BG"  "Zhunyin -> Simplified Hanzi"
-   'its-select-zhuyin-cn)
+(register-input-method
+ "japanese-egg-canna" "Japanese" 'egg-activate-canna
+ "$B$"(B.."  "Romaji -> Hiragana -> Kanji&Kana"
+ 'its-select-hiragana)
 
-  (register-input-method
-   "chinese-gb-egg-wnn-qm" "Chinese-GB" 'egg-activate-wnn
-   "$AG.(B"  "QianMa Simplified Hanzi inputmethod"
-   'its-select-qianma)
+(register-input-method
+ "chinese-gb-egg-wnn-py" "Chinese-GB" 'egg-activate-wnn
+ "$AF4(BG"  "Pinyin -> Simplified Hanzi"
+ 'its-select-pinyin-cn)
 
-  (register-input-method
-   "chinese-gb-egg-wnn-wb" "Chinese-GB" 'egg-activate-wnn
-   "$ANe(B"  "WuBi Simplified Hanzi inputmethod"
-   'its-select-wubi)
+(register-input-method
+ "chinese-gb-egg-wnn-zy" "Chinese-GB" 'egg-activate-wnn
+ "$AW"(BG"  "Zhunyin -> Simplified Hanzi"
+ 'its-select-zhuyin-cn)
 
-  (register-input-method
-   "chinese-cns-egg-wnn-py" "Chinese-CNS" 'egg-activate-wnn
-   "$(GQ;(BC"  "Pinyin -> Traditional Hanzi"
-   'its-select-pinyin-tw)
+(register-input-method
+ "chinese-gb-egg-wnn-qm" "Chinese-GB" 'egg-activate-wnn
+ "$AG.(B"  "QianMa Simplified Hanzi inputmethod"
+ 'its-select-qianma)
 
-  (register-input-method
-   "chinese-cns-egg-wnn-zy" "Chinese-CNS" 'egg-activate-wnn
-   "$(GNC(BC"  "Zhunyin -> Traditional Hanzi"
-   'its-select-zhuyin-tw)
+(register-input-method
+ "chinese-gb-egg-wnn-wb" "Chinese-GB" 'egg-activate-wnn
+ "$ANe(B"  "WuBi Simplified Hanzi inputmethod"
+ 'its-select-wubi)
 
-  (register-input-method
-   "korean-egg-wnn" "Korean" 'egg-activate-wnn
-   "$(CGQ(B"  "Hangul -> Hanja"
-   'its-select-hangul)
+(register-input-method
+ "chinese-cns-egg-wnn-py" "Chinese-CNS" 'egg-activate-wnn
+ "$(GQ;(BC"  "Pinyin -> Traditional Hanzi"
+ 'its-select-pinyin-tw)
 
-  (autoload 'egg-mode "egg" "Toggle EGG  mode." t)
+(register-input-method
+ "chinese-cns-egg-wnn-zy" "Chinese-CNS" 'egg-activate-wnn
+ "$(GNC(BC"  "Zhunyin -> Traditional Hanzi"
+ 'its-select-zhuyin-tw)
 
-  (set-language-info "Japanese"    'input-method "japanese-egg-wnn")
-  (set-language-info "Chinese-GB"  'input-method "chinese-gb-egg-wnn-py")
-  (set-language-info "Chinese-CNS" 'input-method "chinese-cns-egg-wnn-py")
-  (set-language-info "Korean"      'input-method "korean-egg-wnn")
+(register-input-method
+ "korean-egg-wnn" "Korean" 'egg-activate-wnn
+ "$(CGQ(B"  "Hangul -> Hanja"
+ 'its-select-hangul)
+
+(autoload 'egg-mode "egg" "Toggle EGG  mode." t)
+
+(set-language-info "Japanese"    'input-method "japanese-egg-wnn")
+(set-language-info "Chinese-GB"  'input-method "chinese-gb-egg-wnn-py")
+(set-language-info "Chinese-CNS" 'input-method "chinese-cns-egg-wnn-py")
+(set-language-info "Korean"      'input-method "korean-egg-wnn")
 
 (defgroup leim nil 
   "LEIM stands for Libraries of Emacs Input Methods."
@@ -94,29 +107,22 @@
 (defgroup egg nil "" 
   :group 'leim :load "egg")
 
+(defgroup anthy nil ""
+  :group 'egg :load "egg/anthy")
+
 (defgroup wnn nil ""
   :group 'egg :load "egg/wnn")
 
 (defgroup sj3 nil ""
   :group 'egg :load "egg/sj3")
 
+(defgroup canna nil ""
+  :group 'egg :load "egg/canna")
+
 (defgroup its nil "" 
   :group 'egg :load "its")
 
 (defgroup hira nil ""
   :group 'its :load "its/hira")
 
-;;;;
-
-  (require 'egg-util)
-
-  (defun load-leim-list-except-this ()
-    (load-libraries "leim-list" 
-		    (cdr-safe
-		     (member (directory-file-name (file-name-directory load-file-name))
-			     load-path))))
-
-  (message "Finished loading %s \n   and load others..." load-file-name)
-  (load-leim-list-except-this)
-
-  )
\ No newline at end of file
+;;; leim-list.el ends here.
Index: menudiag.el
===================================================================
RCS file: /cvs/tamago/tamago/menudiag.el,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -d -u -p -r1.1.1.1 -r1.2
--- menudiag.el	27 Jan 2001 18:45:24 -0000	1.1.1.1
+++ menudiag.el	27 Jan 2001 18:53:13 -0000	1.2
@@ -50,7 +50,7 @@
 ;;
 
 (defgroup menudiag nil
-  "Input Translation System of Tamagotchy"
+  "Input Translation System of Tamago 4."
   :group 'egg)
 
 (defcustom menudiag-select-without-return nil
@@ -72,26 +72,34 @@
     (while (<= ch ?Z)
       (define-key map (char-to-string ch) 'menudiag-goto-item)
       (setq ch (1+ ch)))
-    (define-key map "\C-a" 'menudiag-beginning-of-line)
-    (define-key map "\C-e" 'menudiag-end-of-line)
-    (define-key map "\M-<" 'menudiag-beginning-of-items)
-    (define-key map "\M->" 'menudiag-end-of-items)
-    (define-key map "\C-f" 'menudiag-forward-item)
-    (define-key map "\C-b" 'menudiag-backward-item)
-    (define-key map "\C-n" 'menudiag-next-line)
-    (define-key map "\C-p" 'menudiag-previous-line)
-    (define-key map "\C-]" 'menudiag-exit)
-    (define-key map "\C-g" 'menudiag-exit-one-level)
-    (define-key map "\C-l" 'menudiag-redraw)
-    (define-key map "\C-m" 'menudiag-select-this-item)
-    (define-key map "?"    'menudiag-list-other-window)
+    (setq ch ?\C-0)
+    (while (<= ch ?\C-9)
+      (define-key map (vector ch) 'digit-argument)
+      (setq ch (1+ ch)))
+    (define-key map [?\C--]  'negative-argument)
+    (define-key map [?\C-u]  'universal-argument)
+    (define-key map " "      'menudiag-forward-item)
+    (define-key map "\C-a"   'menudiag-beginning-of-line)
+    (define-key map "\C-e"   'menudiag-end-of-line)
+    (define-key map "\M-<"   'menudiag-beginning-of-items)
+    (define-key map "\M->"   'menudiag-end-of-items)
+    (define-key map "\C-f"   'menudiag-forward-item)
+    (define-key map "\C-b"   'menudiag-backward-item)
+    (define-key map "\C-n"   'menudiag-next-line)
+    (define-key map "\C-p"   'menudiag-previous-line)
+    (define-key map "\C-]"   'menudiag-exit)
+    (define-key map "\C-g"   'menudiag-exit-one-level)
+    (define-key map "\C-l"   'menudiag-redraw)
+    (define-key map "\C-m"   'menudiag-select-this-item)
+    (define-key map "\M-v"   'menudiag-list-other-window)
+    (define-key map "?"      'menudiag-list-other-window)
     (define-key map [return] 'menudiag-select-this-item)
-    (define-key map [left] 'menudiag-backward-item)
-    (define-key map [right] 'menudiag-forward-item)
-    (define-key map [up] 'menudiag-previous-line)
-    (define-key map [down] 'menudiag-next-line)
-    (define-key map [menudiag-continuation] 'menudiag-follow-continuation)
-    (define-key map [t] 'undefined)
+    (define-key map [left]   'menudiag-backward-item)
+    (define-key map [right]  'menudiag-forward-item)
+    (define-key map [up]     'menudiag-previous-line)
+    (define-key map [down]   'menudiag-next-line)
+    (define-key map [exit]   'menudiag-exit)
+    (define-key map [t]      'undefined)
     map)
   "Keymap for MENU.")
 
@@ -111,8 +119,6 @@
 (defsubst menudiag-item-width (item)
   (+ 4 (string-width (menudiag-item-string item))))
 
-(defvar menudiag-window-conf nil)
-
 (defun menudiag-make-selection-list (item-list line-width)
   (let ((l nil)
 	(line nil)
@@ -135,66 +141,121 @@
 	(reverse (cons (reverse line) l))
       (reverse l))))
 
+(defvar menudiag-show-all nil)
+(make-variable-buffer-local 'menudiag-show-all)
+
+(defvar menudiag-continuation nil)
+(make-variable-buffer-local 'menudiag-continuation)
+
+(defvar menudiag-return-contin nil)
+(make-variable-buffer-local 'menudiag-return-contin)
+
+(defvar menudiag-value nil)
+(make-variable-buffer-local 'menudiag-value)
+
+(defvar menudiag-done nil)
+(make-variable-buffer-local 'menudiag-done)
+
 ;; Entry function
-(defun menudiag-select (menu &optional menudiag-continuation return-contin)
-  (let ((enable-recursive-minibuffers t)
-	value done)
-    (setq menudiag-window-conf nil)
-    (if menudiag-continuation
-	(setq unread-command-events (cons 'menudiag-continuation
-					  unread-command-events)))
-    (if (not return-contin)
-	(setq value t))
-    (menudiag-select-internal menu)
-    (if (eq done t)
-	value
+(defun menudiag-select (menu &optional list-all continuation return-contin)
+  (let ((enable-recursive-minibuffers t))
+    (setq menudiag-return-contin return-contin)
+    (menudiag-select-internal menu list-all continuation)
+    (if (eq menudiag-done t)
+	menudiag-value
       (signal 'quit ""))))
 
-;; Entry function
-(defun menudiag-get-value (continuation)
-  (menudiag-item-value (nth (1- (length continuation)) continuation)))
+(defvar menudiag-line nil)
+(make-variable-buffer-local 'menudiag-line)
+
+(defvar menudiag-linepos 0)
+(make-variable-buffer-local 'menudiag-linepos)
+
+(defvar menudiag-pos-in-line 0)
+(make-variable-buffer-local 'menudiag-pos-in-line)
 
 (defun menudiag-follow-continuation ()
+  (let* ((item (car menudiag-continuation))
+	 (value (menudiag-item-value item))
+	 (pos (menudiag-search-item item)))
+    (unless pos
+      (error "no such item: %s" (menudiag-item-string item)))
+    (menudiag-goto-line (car pos))
+    (menudiag-goto-item-internal (cdr pos))
+    (when (menudiag-menu-p value)
+      (menudiag-select-internal value
+				menudiag-show-all
+				(cdr menudiag-continuation))
+      (menudiag-redraw)
+      (when menudiag-done
+	(when menudiag-return-contin
+	  (setq menudiag-value (cons item menudiag-value)))
+	(setq unread-command-events (cons 'exit unread-command-events))))))
+
+(defvar menudiag-minibuffer-list nil)
+(defvar menudiag-variable-alist nil)
+
+(defmacro menudiag-send-variables (&rest args)
+  `(setq menudiag-variable-alist
+	 (list ,@(mapcar (lambda (var) `(cons ',var ,var)) args))))
+
+(defmacro menudiag-send-variables-with-value (&rest args)
+  `(setq menudiag-variable-alist
+	 ,(let ((alist (list 'list)))
+	    (while args
+	      (nconc alist `((cons ',(car args) ,(cadr args))))
+	      (setq args (cddr args)))
+	    alist)))
+
+(defun menudiag-receive-variables ()
+  (while menudiag-variable-alist
+    (set (caar menudiag-variable-alist) (cdar menudiag-variable-alist))
+    (setq menudiag-variable-alist (cdr menudiag-variable-alist))))
+
+(defvar menudiag-minibuf-prompt nil)
+(make-variable-buffer-local 'menudiag-minibuf-prompt)
+
+(defvar menudiag-current-items nil)
+(make-variable-buffer-local 'menudiag-current-items)
+
+(defvar menudiag-selection-list nil)
+(make-variable-buffer-local 'menudiag-selection-list)
+
+(defun menudiag-minibuffer-hook ()
   (interactive)
-  (let ((item (car menudiag-continuation)))
-    (setq menudiag-continuation (cdr menudiag-continuation))
-    (if menudiag-continuation
-	(setq unread-command-events (cons 'menudiag-continuation
-					  unread-command-events)))
-    (if (eq item 'menudiag-list-all)
-	(menudiag-list-other-window)
-      (let ((in-loop t))
-	(while in-loop
-	  (if (eq item (nth pos-in-line line))
-	      (setq in-loop nil)
-	    (menudiag-forward-item)
-	    (if (and (= linepos 0) (= pos-in-line 0))
-		(error "no such item: %s" (menudiag-item-string item))))))
-      (let ((v (menudiag-item-value item)))
-	(if (menudiag-menu-p v)
-	    (unwind-protect
-		(progn
-		  (menudiag-select-internal v)
-		  (menudiag-redraw))
-	      (if (consp value)
-		  (setq value (cons item value)))
-	      (if done (menudiag-exit-minibuffer))))))))
+  (remove-hook 'minibuffer-setup-hook 'menudiag-minibuffer-hook)
+  (setq menudiag-minibuffer-list (cons (current-buffer)
+				       menudiag-minibuffer-list))
+  (buffer-disable-undo)
+  (menudiag-receive-variables)
+  (menudiag-beginning-of-items)
+  (when menudiag-continuation
+    (menudiag-follow-continuation))
+  (when (and menudiag-show-all (null menudiag-done))
+    (menudiag-list-other-window)))
 
-(defun menudiag-select-internal (menu)
-  (let* ((minibuf-prompt (nth 1 menu))
-	 (current-items (nth 2 menu))
-	 (selection-list
-	  (menudiag-make-selection-list current-items
-					(- (window-width (minibuffer-window))
-					   (string-width minibuf-prompt))))
-	 (line (car selection-list))
-	 (minibuf-contents
-	  (menudiag-make-menu-formatted-string line)))
-    (let ((linepos 0)
-	  (pos-in-line 0))
-      (read-from-minibuffer minibuf-prompt
-			    (cons minibuf-contents 3)
-			    menudiag-mode-map))))
+(defun menudiag-select-internal (menu all &optional continuation)
+  (menudiag-send-variables-with-value
+   menudiag-value          menudiag-value
+   menudiag-continuation   continuation
+   menudiag-return-contin  menudiag-return-contin
+   menudiag-show-all       all
+   menudiag-minibuf-prompt (cadr menu)
+   menudiag-current-items  (car (cddr menu))
+   menudiag-selection-list (menudiag-make-selection-list 
+			    (car (cddr menu))
+			    (- (window-width (minibuffer-window))
+			       (string-width (cadr menu)))))
+  (add-hook 'minibuffer-setup-hook 'menudiag-minibuffer-hook)
+  (unwind-protect
+      (progn
+	(read-from-minibuffer "" "" menudiag-mode-map)
+	(menudiag-receive-variables))
+    (setq menudiag-minibuffer-list (cdr menudiag-minibuffer-list))
+    (remove-hook 'minibuffer-setup-hook 'menudiag-minibuffer-hook)
+    ;; for egg's point-enterd/left hooks
+    (save-excursion
+      (goto-char (point-min)))))
 
 (defun menudiag-make-menu-formatted-string (item-list)
   (let ((i -1))
@@ -217,7 +278,7 @@
     char))
 
 ;; Character --> ITEM No
-(defun menudiag-char-to-item-num (char)
+(defun menudiag-char-to-item-num (ch)
   (let ((num))
     (cond ((and (<= ?0 ch) (<= ch ?9))
            (setq num (- ch ?0)))
@@ -228,44 +289,52 @@
           (t (setq num 1000)))
     num))
 
+(defun menudiag-check-current-menu ()
+  (or (eq (current-buffer) (car menudiag-minibuffer-list))
+      (error "menudiag: not current menu")))
+
 (defun menudiag-goto-item ()
   (interactive)
+  (menudiag-check-current-menu)
   (let ((ch last-command-char)
 	(n 0))
     (setq n (menudiag-char-to-item-num ch))
-    (if (>= n (length line))
+    (if (>= n (length menudiag-line))
 	(error "No such item")
       (menudiag-goto-item-internal n)
       (if menudiag-select-without-return
 	  (menudiag-select-this-item)))))
 
 (defun menudiag-goto-item-internal (n)
-  (let ((old-pos-in-line pos-in-line)
-	(p 3)
+  (let ((p (+ (length menudiag-minibuf-prompt) 3))
 	(i 0))
-    (setq pos-in-line n)
-    (while (< i pos-in-line)
-      (setq p (+ p (length (menudiag-item-string (nth i line))) 4))
+    (setq menudiag-pos-in-line n)
+    (while (< i menudiag-pos-in-line)
+      (setq p (+ p (length (menudiag-item-string (nth i menudiag-line))) 4))
       (setq i (1+ i)))
     (goto-char p)))
 
 (defun menudiag-beginning-of-items ()
   (interactive)
+  (menudiag-check-current-menu)
   (menudiag-goto-line 0)
   (menudiag-beginning-of-line))
 
 (defun menudiag-end-of-items ()
   (interactive)
-  (menudiag-goto-line (1- (length selection-list)))
+  (menudiag-check-current-menu)
+  (menudiag-goto-line (1- (length menudiag-selection-list)))
   (menudiag-end-of-line))
 
 (defun menudiag-beginning-of-line ()
   (interactive)
+  (menudiag-check-current-menu)
   (menudiag-goto-item-internal 0))
 
 (defun menudiag-end-of-line ()
   (interactive)
-  (menudiag-goto-item-internal (1- (length line))))
+  (menudiag-check-current-menu)
+  (menudiag-goto-item-internal (1- (length menudiag-line))))
 
 ;; Should retain compatibility.  Must.
 ;;
@@ -296,127 +365,166 @@
 ;;    (insert (menudiag-make-menu-formatted-string line))))
 ;;
 
-(defun menudiag-forward-item ()
-  (interactive)
-  (if (< pos-in-line (1- (length line)))
-      (menudiag-goto-item-internal (1+ pos-in-line))
-    (if (>= linepos (1- (length selection-list)))
-	(menudiag-goto-line 0)
-      (menudiag-goto-line (1+ linepos)))
-    (menudiag-beginning-of-line)))
+(defun menudiag-forward-item (n)
+  (interactive "p")
+  (menudiag-forward-item-internal n))
 
-(defun menudiag-backward-item ()
-  (interactive)
-  (if (< 0 pos-in-line)
-      (menudiag-goto-item-internal (1- pos-in-line))
-    (if (< linepos 1)
-        (menudiag-goto-line (1- (length selection-list)))
-      (menudiag-goto-line (1- linepos)))
-    (menudiag-end-of-line)))
+(defun menudiag-backward-item (n)
+  (interactive "p")
+  (menudiag-forward-item-internal (- n)))
+
+(defun menudiag-forward-item-internal (n)
+  (menudiag-check-current-menu)
+  (setq n (+ n menudiag-pos-in-line))
+  (while (< n 0)
+    (menudiag-goto-line (1- menudiag-linepos))
+    (setq n (+ n (length menudiag-line))))
+  (while (>= n (length menudiag-line))
+    (setq n (- n (length menudiag-line)))
+    (menudiag-goto-line (1+ menudiag-linepos)))
+  (menudiag-goto-item-internal n))
 
 (defun menudiag-goto-line (n)
-  (cond
-   ((>= n (length selection-list))
-    (setq n 0))
-   ((< n 0)
-    (setq n (1- (length selection-list)))))
-  (setq line (nth n selection-list)
-        linepos n)
-  (delete-region (point-min) (point-max))
-  (insert (menudiag-make-menu-formatted-string line)))
+  (let ((len (length menudiag-selection-list)))
+    (when (< n 0)
+      (setq n (+ (% n len) len)))
+    (when (>= n len)
+      (setq n (% n len)))
+    (setq menudiag-line (nth n menudiag-selection-list)
+	  menudiag-linepos n)
+    (let ((inhibit-read-only t))
+      (erase-buffer)
+      (insert menudiag-minibuf-prompt
+	      (menudiag-make-menu-formatted-string menudiag-line))
+      (set-text-properties (point-min) (point-max) '(read-only t)))))
 
-(defun menudiag-next-line ()
-  (interactive)
-  (menudiag-goto-line (1+ linepos))
-  (if (< pos-in-line (length line))
-      (menudiag-goto-item-internal pos-in-line)
-    (menudiag-end-of-line)))
+(defun menudiag-next-line (n)
+  (interactive "p")
+  (menudiag-next-line-internal n))
 
-(defun menudiag-previous-line ()
-  (interactive)
-  (menudiag-goto-line (1- linepos))
-  (if (< pos-in-line (length line))
-      (menudiag-goto-item-internal pos-in-line)
+(defun menudiag-previous-line (n)
+  (interactive "p")
+  (menudiag-next-line-internal (- n)))
+
+(defun menudiag-next-line-internal (n)
+  (menudiag-check-current-menu)
+  (menudiag-goto-line (+ menudiag-linepos n))
+  (if (< menudiag-pos-in-line (length menudiag-line))
+      (menudiag-goto-item-internal menudiag-pos-in-line)
     (menudiag-end-of-line)))
 
 (defun menudiag-redraw ()
   (interactive)
-  (menudiag-goto-line linepos)
-  (menudiag-goto-item-internal pos-in-line))
+  (menudiag-check-current-menu)
+  (menudiag-goto-line menudiag-linepos)
+  (menudiag-goto-item-internal menudiag-pos-in-line))
 
 (defun menudiag-exit-one-level ()
   (interactive)
+  (menudiag-check-current-menu)
   (menudiag-exit-minibuffer))
 
 (defun menudiag-exit ()
   (interactive)
-  (setq done 'quit)
+  (menudiag-check-current-menu)
+  (unless menudiag-done
+    (setq menudiag-done 'quit))
   (menudiag-exit-minibuffer))
 
-(defun menudiag-select-this-item ()
+(defun menudiag-select-this-item (&optional all)
   (interactive)
-  (let* ((item (nth pos-in-line line))
+  (menudiag-check-current-menu)
+  (let* ((item (nth menudiag-pos-in-line menudiag-line))
 	 (v (menudiag-item-value item)))
     (if (menudiag-menu-p v)
-	(unwind-protect
-	    (progn
-	      (menudiag-restore-window)
-	      (menudiag-select-internal v)
-	      (menudiag-redraw))
-	  (if (consp value)
-	      (setq value (cons item value)))
-	  (if done (menudiag-exit-minibuffer)))
-      (if (eq value t)
-	  (setq value (menudiag-item-value item))
-	(setq value (cons item nil)))
-      (setq done t)
+	(progn
+	  (menudiag-restore-window)
+	  (menudiag-select-internal v all)
+	  (menudiag-redraw)
+	  (cond (menudiag-done
+		 (when menudiag-return-contin
+		   (setq menudiag-value (cons item menudiag-value)))
+		 (menudiag-exit-minibuffer))
+		(all
+		 (menudiag-list-other-window))))
+      (setq menudiag-value (if menudiag-return-contin
+			       (list item)
+			     (menudiag-item-value item))
+	    menudiag-done t)
       (menudiag-exit-minibuffer))))
+
+(defun menudiag-search-item (item)
+  (let ((selection-list menudiag-selection-list)
+	(line 0)
+	rest)
+    (while (and selection-list
+		(null (setq rest (memq item (car selection-list)))))
+      (setq selection-list (cdr selection-list)
+	    line (1+ line)))
+    (and selection-list
+	 (cons line (- (length (car selection-list)) (length rest))))))
 
 (defconst menudiag-selection-map
-  (let ((map (make-sparse-keymap)))
-    (define-key map [right]   'next-completion)
-    (define-key map [left]    'previous-completion)
-    (define-key map "\r"      'menudiag-choose-item)
-    (define-key map [mouse-2] 'menudiag-mouse-choose-item)
-    map))
+  (let ((map (make-sparse-keymap))
+	(ch ?0))
+    (while (<= ch ?9)
+      (define-key map (char-to-string ch) 'menudiag-selection-goto)
+      (setq ch (1+ ch)))
+    (define-key map "q"            'menudiag-retun-to-minibuf)
+    (define-key map "\C-b"         'previous-completion)
+    (define-key map "\M-b"         'previous-completion)
+    (define-key map "\C-f"         'next-completion)
+    (define-key map "\M-f"         'next-completion)
+    (define-key map " "            'next-completion)
+    (define-key map "\C-g"         'menudiag-selection-exit-one-level)
+    (define-key map "\C-m"         'menudiag-choose-item)
+    (define-key map "\C-]"         'menudiag-selection-exit)
+    (define-key map "\177"         'menudiag-selection-goto-delete)
+    (define-key map [delete]       'menudiag-selection-goto-delete)
+    (define-key map [backspace]    'menudiag-selection-goto-delete)
+    (define-key map [right]        'next-completion)
+    (define-key map [left]         'previous-completion)
+    (define-key map [return]       'menudiag-choose-item)
+    (define-key map [mouse-2]      'menudiag-mouse-choose-item)
+    map)
+  "keymap for menu selection mode")
+
+(defvar menudiag-window-conf nil)
+(make-variable-buffer-local 'menudiag-window-conf)
 
 (defvar menudiag-selection-buffer nil)
 (make-variable-buffer-local 'menudiag-selection-buffer)
-(put 'menudiag-selection-buffer 'permanent-local t)
 
 (defvar menudiag-selection-main-buffer nil)
 (make-variable-buffer-local 'menudiag-selection-main-buffer)
-(put 'menudiag-selection-main-buffer 'permanent-local t)
 
 (defun menudiag-selection-mode ()
-  (interactive)
   (kill-all-local-variables)
   (make-local-variable 'inhibit-read-only)
   (setq buffer-read-only t
 	inhibit-read-only nil)
+  (make-local-hook 'post-command-hook)
+  (add-hook 'post-command-hook 'menudiag-selection-align-to-item nil t)
   (use-local-map menudiag-selection-map)
   (setq mode-name "Menudiag Selection")
   (setq major-mode 'menudiag-selection-mode))
 
-(defun menudiag-max-item-width (item-list)
-  (let ((max 0))
-    (while item-list
-      (setq max (max max (menudiag-item-width (car item-list)))
-	    item-list (cdr item-list)))
-    max))
+(defun menudiag-max-item-width (items)
+  (apply 'max (mapcar 'menudiag-item-width items)))
 
 (defun menudiag-buffer-show-function ()
-  (let* ((items current-items)
-	 (digits (length (concat (length items))))
-	 (columns (max 1 (/ (window-width (minibuffer-window))
+  (menudiag-receive-variables)
+  (let* ((items menudiag-current-items)
+	 (digits (length (number-to-string (length items))))
+	 (form (concat "%" (number-to-string digits) "d. %s"))
+	 (columns (max 1 (/ (window-width (selected-window))
 			    (+ digits (menudiag-max-item-width items)))))
-	 (width (/ (window-width (minibuffer-window)) columns))
-	 (col 0) (n 0) str)
+	 (width (/ (window-width (selected-window)) columns))
+	 (col 0) (n 0) str p)
     (insert " ")
     (while items
       (setq p (point)
-	    str (format (concat "%" digits "d. %s")
-			n (menudiag-item-string (car items))))
+	    str (format form n (menudiag-item-string (car items))))
       (insert str)
       (set-text-properties p (point) '(mouse-face highlight))
       (setq col (1+ col)
@@ -433,75 +541,156 @@
 
 (defun menudiag-buffer-name (prompt)
   (let ((len (1- (length prompt))))
-    (if (= (aref prompt len) ?:) (substring prompt 0 len) prompt)))
+    (generate-new-buffer-name
+     (if (= (aref prompt len) ?:) (substring prompt 0 len) prompt))))
 
 (defun menudiag-list-other-window ()
   (interactive)
-  (let ((temp-buffer-show-hook 'menudiag-buffer-show-function)
-	(main-buf (current-buffer)))
-    (setq menudiag-window-conf (current-window-configuration))
-    (with-output-to-temp-buffer (menudiag-buffer-name minibuf-prompt)
-      (setq menudiag-selection-buffer standard-output))
-    (set-buffer menudiag-selection-buffer)
-    (setq menudiag-selection-main-buffer main-buf)))
+  (menudiag-check-current-menu)
+  (let ((window (and menudiag-selection-buffer
+		     (get-buffer-window menudiag-selection-buffer))))
+    (if window
+	(select-window window)
+      (let ((temp-buffer-show-hook 'menudiag-buffer-show-function)
+	    (main-buf (current-buffer))
+	    (selection-list menudiag-selection-list)
+	    (linepos menudiag-linepos)
+	    (n (1+ menudiag-pos-in-line)))
+	(setq menudiag-window-conf (current-window-configuration))
+	(menudiag-send-variables menudiag-current-items)
+	(with-output-to-temp-buffer
+	    (menudiag-buffer-name menudiag-minibuf-prompt)
+	  (setq menudiag-selection-buffer standard-output))
+	(switch-to-buffer-other-window menudiag-selection-buffer)
+	(setq menudiag-selection-main-buffer main-buf
+	      menudiag-selection-list selection-list)
+	(while (> linepos 0)
+	  (setq linepos (1- linepos)
+		n (+ n (length (car selection-list)))
+		selection-list (cdr selection-list)))
+	(next-completion n)))))
+
+(defun menudiag-check-current-menu-list ()
+  (or (eq menudiag-selection-main-buffer (car menudiag-minibuffer-list))
+      (error "menudiag: not current menu list")))
 
 (defun menudiag-choose-item ()
   (interactive)
-  (let ((org-buf menudiag-selection-main-buffer)
-	(sel-buf (current-buffer))
-	(item-list selection-list)
-	(l 0)
-	tmp-buf n)
-    (with-temp-buffer
-      (setq tmp-buf (current-buffer))
-      (set-buffer sel-buf)
-      (setq completion-reference-buffer tmp-buf)
-      (choose-completion)
-      (set-buffer tmp-buf)
-      (setq n (string-to-int (buffer-string))))
-    (pop-to-buffer org-buf)
-    (while (and item-list (>= (- n (length (car item-list))) 0))
-      (setq l (1+ l)
-	    n (- n (length (car item-list)))
-	    item-list (cdr item-list)))
-    (menudiag-goto-line l)
-    (menudiag-goto-item-internal n)
-    (menudiag-select-this-item)))
+  (menudiag-choose-item-internal nil))
 
 (defun menudiag-mouse-choose-item (event)
   (interactive "e")
-  (set-buffer (window-buffer (car (nth 1 event))))
+  (set-buffer (window-buffer (caadr event)))
+  (menudiag-choose-item-internal event))
+
+(defun menudiag-choose-item-internal (event)
+  (menudiag-check-current-menu-list)
   (let ((org-buf menudiag-selection-main-buffer)
 	(sel-buf (current-buffer))
-	(item-list selection-list)
+	(item-list menudiag-selection-list)
 	(l 0)
 	tmp-buf n)
     (with-temp-buffer
       (setq tmp-buf (current-buffer))
       (set-buffer sel-buf)
       (setq completion-reference-buffer tmp-buf)
-      (mouse-choose-completion event)
+      (if event
+	  (mouse-choose-completion event)
+	(choose-completion))
       (set-buffer tmp-buf)
       (setq n (string-to-int (buffer-string))))
     (pop-to-buffer org-buf)
-    (while (and item-list (>= (- n (length (car item-list))) 0))
+    (while (and item-list (>= n (length (car item-list))))
       (setq l (1+ l)
 	    n (- n (length (car item-list)))
 	    item-list (cdr item-list)))
     (menudiag-goto-line l)
     (menudiag-goto-item-internal n)
-    (menudiag-select-this-item)))
+    (menudiag-select-this-item t)))
+
+(defvar menudiag-goto-number-list nil)
+(make-variable-buffer-local 'menudiag-goto-number-list)
+
+(defvar menudiag-original-point nil)
+(make-variable-buffer-local' menudiag-original-point)
+
+(defun menudiag-selection-goto ()
+  (interactive)
+  (unless (eq last-command 'menudiag-selection-goto)
+    (setq menudiag-goto-number-list nil
+	  menudiag-original-point (point)))
+  (setq menudiag-goto-number-list (cons (- last-command-char ?0)
+					menudiag-goto-number-list))
+  (menudiag-selection-goto-internal))
+
+(defun menudiag-selection-goto-internal ()
+  (let* ((list menudiag-goto-number-list)
+	 (n (menudiag-selection-item-number list))
+	 (len (save-excursion
+		(set-buffer menudiag-selection-main-buffer)
+		(length menudiag-current-items))))
+    (setq this-command 'menudiag-selection-goto)
+    (if (>= n len)
+	(progn
+	  (ding)
+	  (setq menudiag-goto-number-list (cdr list)))
+    (goto-char (point-min))
+    (next-completion (1+ n)))))
+
+(defun menudiag-selection-item-number (list)
+  (let ((n 0)
+	(exp 1))
+    (while list
+      (setq n (+ (* (car list) exp) n)
+	    exp (* 10 exp)
+	    list (cdr list)))
+    n))
+
+(defun menudiag-selection-goto-delete (n)
+  (interactive "p")
+  (if (null (eq last-command 'menudiag-selection-goto))
+      (ding)
+    (setq menudiag-goto-number-list (nthcdr n menudiag-goto-number-list))
+    (if (null menudiag-goto-number-list)
+	(goto-char menudiag-original-point)
+      (menudiag-selection-goto-internal))))
+
+(defun menudiag-selection-align-to-item ()
+  (cond ((bolp)
+	 (next-completion 1))
+	((get-text-property (1- (point)) 'mouse-face)
+	 (goto-char (previous-single-property-change (point) 'mouse-face)))))
 
 (defun menudiag-restore-window ()
-  (if menudiag-window-conf
-      (progn
-	(set-window-configuration menudiag-window-conf)
-	(setq menudiag-window-conf nil)
-	(kill-buffer menudiag-selection-buffer))))
+  (when menudiag-window-conf
+    (set-window-configuration menudiag-window-conf)
+    (kill-buffer menudiag-selection-buffer)))
 
 (defun menudiag-exit-minibuffer ()
-  (and menudiag-window-conf (menudiag-restore-window))
+  (menudiag-restore-window)
+  (menudiag-send-variables menudiag-done menudiag-value)
+  (buffer-enable-undo)
   (exit-minibuffer))
+
+(defun menudiag-retun-to-minibuf ()
+  (interactive)
+  (menudiag-check-current-menu-list)
+  (unless (minibuffer-window-active-p (minibuffer-window))
+    (set-minibuffer-window (minibuffer-window)))
+  (let ((window (get-buffer-window menudiag-selection-main-buffer)))
+    (if window
+	(select-window window)
+      (error "menudiag: cannot find minibuffer"))))
+
+(defun menudiag-selection-exit-one-level ()
+  (interactive)
+  (set-buffer menudiag-selection-main-buffer)
+  (menudiag-exit-one-level))
+
+(defun menudiag-selection-exit ()
+  (interactive)
+  (set-buffer menudiag-selection-main-buffer)
+  (menudiag-exit))
 
 (provide 'menudiag)
 ;;; menudiag.el ends here.
Index: egg/anthy.el
===================================================================
RCS file: egg/anthy.el
diff -N egg/anthy.el
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ egg/anthy.el	8 Aug 2002 08:11:22 -0000	1.2
@@ -0,0 +1,220 @@
+;;; egg/anthy.el --- ANTHY Support (high level interface) in Egg
+;;;                Input Method Architecture
+
+;; Copyright (C) 2002 The Free Software Initiative of Japan
+
+;; Author: NIIBE Yutaka <gniibe@m17n.org>
+
+;; Maintainer: NIIBE Yutaka <gniibe@m17n.org>
+
+;; Keywords: mule, multilingual, input method
+
+;; This file is part of EGG.
+
+;; EGG is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; EGG is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+
+;;; Code:
+
+(require 'egg)
+(require 'egg-edep)
+
+(defgroup anthy nil
+  "Anthy interface for Tamago 4."
+  :group 'egg)
+
+(setplist 'anthy-conversion-backend
+	  '(egg-start-conversion          anthy-convert
+	    egg-get-bunsetsu-source       anthy-get-bunsetsu-source
+	    egg-get-bunsetsu-converted    anthy-get-bunsetsu-converted
+	    egg-list-candidates           anthy-get-candidates
+	    egg-decide-candidate          anthy-select-candidate
+	    egg-change-bunsetsu-length    anthy-resize-segment
+	    egg-end-conversion            anthy-commit
+	    ;;
+	    egg-get-source-language       anthy-get-source-language
+	    egg-get-converted-language    anthy-get-converted-language))
+
+(defconst anthy-backend-alist '((Japanese ((anthy-conversion-backend)))))
+
+(egg-set-finalize-backend '(anthy-finalize-backend))
+
+(defvar anthy-proc nil
+  "Process of ANTHY helper agent.")
+
+;; <environments> ::= ( <env> ... <env> )
+;;
+;; <env> ::= <context-descriptor>
+;; <context-descriptor> ::= <integer>
+(defvar anthy-environment-pool nil
+  "Environments for ANTHY kana-kanji conversion, to be used.")
+
+(defvar anthy-environments-in-use nil
+  "Environments for ANTHY kana-kanji conversion, in use.")
+
+;;
+;; <anthy-bunsetsu> ::=
+;;  [ <env> <source> <converted> <candidates> <candidate-pos> <seg-no> ]
+(defsubst anthy-make-bunsetsu (env source converted seg-no)
+  (egg-bunsetsu-create
+   'anthy-conversion-backend
+   (vector env source converted nil 0 seg-no)))
+
+(defsubst anthybunsetsu-get-env (b)
+  (aref (egg-bunsetsu-get-info b) 0))
+(defsubst anthybunsetsu-get-source (b)
+  (aref (egg-bunsetsu-get-info b) 1))
+(defsubst anthybunsetsu-get-converted (b)
+  (aref (egg-bunsetsu-get-info b) 2))
+(defsubst anthybunsetsu-get-candidates (b)
+  (aref (egg-bunsetsu-get-info b) 3))
+(defsubst anthybunsetsu-set-candidates (b z)
+  (aset (egg-bunsetsu-get-info b) 3 z))
+(defsubst anthybunsetsu-get-candidate-pos (b)
+  (aref (egg-bunsetsu-get-info b) 4))
+(defsubst anthybunsetsu-set-candidate-pos (b zp)
+  (aset (egg-bunsetsu-get-info b) 4 zp))
+(defsubst anthybunsetsu-get-seg-no (b)
+  (aref (egg-bunsetsu-get-info b) 5))
+
+(defun anthy-get-bunsetsu-source (b)
+  (anthybunsetsu-get-source b))
+
+(defun anthy-get-bunsetsu-converted (b)
+  (let ((cands (anthybunsetsu-get-candidates b)))
+    (if cands
+	(nth (anthybunsetsu-get-candidate-pos b) cands)
+      (anthybunsetsu-get-converted b))))
+
+(defun anthy-get-source-language (b) 'Japanese)
+(defun anthy-get-converted-language (b) 'Japanese)
+
+;; Getting new context-descriptor, and returns environment with 'inuse' bit
+(defun anthy-new-environment ()
+  (if (null anthy-proc)
+      (let ((buf (generate-new-buffer " *ANTHY*"))
+	    (process-connection-type nil)) ; avoid using pty
+	(setq anthy-proc
+	      (start-process "anthy-agent" buf "anthy-agent" "--egg"))
+	(process-kill-without-query anthy-proc)
+	(set-process-coding-system anthy-proc 'euc-jp-dos 'euc-jp-dos)
+	(set-process-sentinel anthy-proc 'anthy-proc-sentinel)
+	(set-marker-insertion-type (process-mark anthy-proc) t)
+	(save-excursion
+	  (set-buffer buf)
+	  (erase-buffer)
+	  (buffer-disable-undo))))
+  (anthyipc-get-greeting anthy-proc)
+  (anthyipc-new-context anthy-proc))
+
+;;; XXX: Don't kill buffer (for now) so that I can debug this program
+(defun anthy-proc-sentinel (proc reason)
+;  (kill-buffer (process-buffer proc))
+  (setq anthy-proc nil
+	anthy-environments-in-use nil
+	anthy-environment-pool nil))
+
+;;; anthyipc-release-context
+
+
+(defun anthy-get-environment ()
+  "Return the ANTHY environment."
+  (if anthy-environment-pool
+      (let ((env (car anthy-environment-pool)))
+	(setq anthy-environment-pool (cdr anthy-environment-pool))
+	(setq anthy-environments-in-use (cons env anthy-environments-in-use))
+	env)
+    (let ((env (anthy-new-environment)))
+      (setq anthy-environments-in-use (cons env anthy-environments-in-use))
+      env)))
+
+;;
+;; Returns list of bunsetsu
+;;
+(defun anthy-convert (backend yomi &optional context)
+  "Convert YOMI string to kanji, and enter conversion mode.
+Return the list of bunsetsu."
+  (let ((env (anthy-get-environment)))
+    (anthyipc-convert anthy-proc env yomi)))
+
+;;
+;;
+;;
+(defun anthy-commit (bunsetsu-list abort)
+  (let ((env (anthybunsetsu-get-env (car bunsetsu-list))))
+    (anthyipc-commit anthy-proc env (if abort 1 0))
+    (setq anthy-environment-pool (cons env anthy-environment-pool))
+    (setq anthy-environments-in-use (delq env anthy-environments-in-use))))
+
+;;
+;; Returns ( <pos> <candidates> )
+;;
+(defun anthy-get-candidates (bunsetsu-list prev-bunsetsu next-bunsetsu major)
+  (let ((bunsetsu (car bunsetsu-list)))
+    (if (anthybunsetsu-get-candidates bunsetsu)
+	(cons (anthybunsetsu-get-candidate-pos bunsetsu)
+	      (anthybunsetsu-get-candidates bunsetsu))
+      (let* ((env (anthybunsetsu-get-env bunsetsu))
+	     (seg-no (anthybunsetsu-get-seg-no bunsetsu))
+	     (cands (anthyipc-get-candidates anthy-proc env seg-no)))
+	(cons (anthybunsetsu-set-candidate-pos bunsetsu 0)
+	      (anthybunsetsu-set-candidates bunsetsu cands))))))
+
+;; Returns list of list of bunsetsu
+(defun anthy-select-candidate (bunsetsu-list candidate-pos prev-b next-b)
+  (let* ((bunsetsu (car bunsetsu-list))
+	 (candidate-list (anthybunsetsu-get-candidates bunsetsu))
+	 (candidate (nth candidate-pos candidate-list))
+	 (env (anthybunsetsu-get-env bunsetsu))
+	 (seg-no (anthybunsetsu-get-seg-no bunsetsu)))
+    (anthybunsetsu-set-candidate-pos bunsetsu candidate-pos)
+    ;; Anthy doesn't have capability of changing another segment
+    ;; at the selection of a segment.
+    ;; So, just ignore the result of "SELECT-CANDIDATE"
+    (anthyipc-select-candidate anthy-proc env seg-no candidate-pos)
+    (list (list bunsetsu))))
+
+;; Returns list of list of bunsetsu
+(defun anthy-resize-segment (bunsetsu-list prev-b next-b len major)
+  (let ((bunsetsu (car bunsetsu-list)))
+    (let ((env (anthybunsetsu-get-env bunsetsu))
+	  (seg-no (anthybunsetsu-get-seg-no bunsetsu))
+	  (prevlen (length (anthybunsetsu-get-source bunsetsu))))
+      (let ((r (anthyipc-resize-segment anthy-proc env seg-no
+					(if (< prevlen len) 0 1))))
+	;; XXX: I don't know what this means, 
+	;; but this works.  Blame EGG.
+	(list (list (car r)) nil (cdr r))))))
+
+(defun anthy-finalize-backend ()
+  (if anthy-proc
+      (progn
+	(delete-process anthy-proc)
+	(setq anthy-proc nil))))
+
+;;; setup
+
+(load "egg/anthyipc")
+(run-hooks 'anthy-load-hook)
+
+;;;###autoload
+(defun egg-activate-anthy (&rest arg)
+  "Activate ANTHY backend of Tamago 4."
+  (apply 'egg-mode (append arg anthy-backend-alist)))
+
+;;; egg/anthy.el ends here.
Index: egg/anthyipc.el
===================================================================
RCS file: egg/anthyipc.el
diff -N egg/anthyipc.el
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ egg/anthyipc.el	8 Aug 2002 07:28:41 -0000	1.1
@@ -0,0 +1,195 @@
+;;; egg/anthyipc.el --- ANTHY IPC Support (low level interface) in Egg
+;;;                Input Method Architecture
+
+;; Copyright (C) 2002 The Free Software Initiative of Japan
+
+;; Author: NIIBE Yutaka <gniibe@m17n.org>
+
+;; Maintainer: NIIBE Yutaka <gniibe@m17n.org>
+
+;; Keywords: mule, multilingual, input method
+
+;; This file is part of EGG.
+
+;; EGG is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; EGG is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+
+;;; Code:
+
+(defmacro anthyipc-call-with-proc (proc vlist send-expr &rest receive-exprs)
+  `(let* ((proc ,proc)
+	  (buffer (process-buffer proc))
+	  ,@vlist)
+     (if (and (eq (process-status proc) 'run)
+	      (buffer-live-p buffer))
+	 (save-excursion
+	   (set-buffer buffer)
+	   (erase-buffer)
+	   ,send-expr
+	   (goto-char (point-max))
+	   (process-send-region proc (point-min) (point-max))
+	   ,@receive-exprs)
+       (egg-error "process %s was killed" proc))))
+
+(defun anthyipc-wait-line ()
+  (let ((start (point)))
+    (while (not (search-forward "\n" nil 1))
+      (accept-process-output proc 1000)
+      (goto-char start))
+    (goto-char start)))
+
+(defun anthyipc-accept-ok ()
+  (anthyipc-wait-line)
+  (if (eq (char-after) ?+)
+      ;; "+OK"
+      (goto-char (point-max))
+    (egg-error "protocol error: %s" (buffer-substring (point) (point-max)))))
+
+(defun anthyipc-accept-number ()
+  (anthyipc-wait-line)
+  (if (eq (char-after)  ?+)
+      ;; "+OK <number>"
+      (progn
+	(forward-char 4)
+	(prog1
+	    (read (current-buffer))
+	  (goto-char (point-max))))
+    (egg-error "protocol error: %s" (buffer-substring (point) (point-max)))))
+
+(defun anthyipc-read-string ()
+  (if (eq (char-after) ?\ )
+    (forward-char 1))
+  (let ((start (point)))
+    (while (and (char-after)
+		(not (eq (char-after) ?\ ))
+		(not (eq (char-after) ?\n)))
+      (forward-char 1))
+    (buffer-substring start (point))))
+
+(defun anthyipc-accept-segments (env seg-no-orig)
+  (anthyipc-wait-line)
+  (if (eq (char-after) ?+)
+      (progn
+	(forward-char 1)
+	(if (eq (char-after) ?O)
+	    ;; "+OK"
+	    (progn
+	      (goto-char (point-max))
+	      t)
+	  ;; "+DATA <seg-no> <num-segments-removed> <num-segments-inserted>"
+	  ;; "<num-candidates> <converted> <yomi>"*N
+	  ;; ""
+	  ;;
+	  (forward-char 5)
+	  (let* ((seg-no (read (current-buffer)))
+		 (num-segments-removed (read (current-buffer)))
+		 (num-segments-inserted (read (current-buffer)))
+		 (segment-list nil)
+		 (in-loop t)
+		 (i seg-no))
+	    (while in-loop
+	      (forward-char 1)
+	      (anthyipc-wait-line)
+	      (if (eq (char-after) ?\n)
+		  (setq in-loop nil)
+		(let* ((num-candidates (read (current-buffer)))
+		       (converted (anthyipc-read-string))
+		       (source (anthyipc-read-string))
+		       (segment (anthy-make-bunsetsu env source converted i)))
+		  (setq i (1+ i))
+		  (setq segment-list (cons segment segment-list)))))
+	    ;; XXX check if seg-no == seg-no-orig
+	    ;; XXX check inserted and length of segment-list???
+	    (forward-char 1)
+	    (cons seg-no (cons num-segments-removed (reverse segment-list))))))
+    (egg-error "protocol error: %s" (buffer-substring (point) (point-max)))))
+
+(defun anthyipc-accept-candidates ()
+  (anthyipc-wait-line)
+  (if (eq (char-after) ?+)
+      (progn
+	;; "+DATA <offset> <num-candidates>"
+	;; "<converted>"*N
+	;; ""
+	(forward-char 6)
+	(let* ((offset (read (current-buffer)))
+	       (num-candidates (read (current-buffer)))
+	       (candidate-list nil)
+	       (in-loop t))
+	  (while in-loop
+	    (forward-char 1)
+	    (anthyipc-wait-line)
+	    (if (eq (char-after) ?\n)
+		(setq in-loop nil)
+	      (let ((candidate (anthyipc-read-string)))
+		(setq candidate-list (cons candidate candidate-list)))))
+	  ;; XXX check num-candidates and length of candidate-list???
+	  (forward-char 1)
+	  (cons offset (reverse candidate-list))))
+    (egg-error "protocol error: %s" (buffer-substring (point) (point-max)))))
+
+(defun anthyipc-get-greeting (proc)
+  (anthyipc-call-with-proc proc ()
+    nil
+    (anthyipc-wait-line)
+    (message (buffer-substring (point-min) (1- (point-max))))))
+
+(defun anthyipc-new-context (proc)
+  (anthyipc-call-with-proc proc ()
+    (insert "NEW-CONTEXT INPUT=#18 OUTPUT=#18\n")
+    (anthyipc-accept-number)))
+
+(defun anthyipc-release-context (proc cont)
+  (anthyipc-call-with-proc proc ()
+    (insert (format "RELEASE-CONTEXT %d\n" cont))
+    (anthyipc-accept-ok)))
+
+;; Returns list of bunsetsu
+(defun anthyipc-convert (proc cont yomi)
+  (anthyipc-call-with-proc proc ()
+    (insert (format "CONVERT %d %s\n" cont yomi))
+    (let ((r (anthyipc-accept-segments cont 0)))
+      (cdr (cdr r)))))
+
+(defun anthyipc-commit (proc cont cancel)
+  (anthyipc-call-with-proc proc ()
+    (insert (format "COMMIT %d %d\n" cont cancel))
+    (anthyipc-accept-ok)))
+
+;;; Returns list of candidate
+(defconst anthy-max-candidates 9999)
+(defun anthyipc-get-candidates (proc cont seg-no)
+  (anthyipc-call-with-proc proc ()
+    (insert
+     (format "GET-CANDIDATES %d %d %d %d\n" cont seg-no 0 anthy-max-candidates))
+    (let ((r (anthyipc-accept-candidates)))
+      (cdr r))))
+
+;;; Returns segments
+(defun anthyipc-select-candidate (proc cont seg-no candidate-no)
+  (anthyipc-call-with-proc proc ()
+    (insert (format "SELECT-CANDIDATE %d %d %d\n" cont seg-no candidate-no))
+    (anthyipc-accept-segments cont seg-no)))
+
+;;; Returns segments
+(defun anthyipc-resize-segment (proc cont seg-no inc-dec)
+  (anthyipc-call-with-proc proc ()
+    (insert (format "RESIZE-SEGMENT %d %d %d\n" cont seg-no inc-dec))
+    (cddr (anthyipc-accept-segments cont seg-no))))
+
+;;; egg/anthyipc.el ends here.
Index: egg/canna.el
===================================================================
RCS file: /cvs/tamago/tamago/egg/canna.el,v
retrieving revision 1.1.1.1
retrieving revision 1.4
diff -d -u -p -r1.1.1.1 -r1.4
--- egg/canna.el	27 Jan 2001 18:45:24 -0000	1.1.1.1
+++ egg/canna.el	22 Jul 2002 13:18:56 -0000	1.4
@@ -30,257 +30,878 @@
 
 ;;; Code:
 
-
+(require 'egg)
 (require 'egg-edep)
 
-(eval-when-compile
-  (defmacro CANNA-const (c)
-    (cond ((eq c 'FileNotExist) xxxxxxxxxxxxxx)
-	  )))
+(defgroup canna nil
+  "CANNA interface for Tamago 4."
+  :group 'egg)
 
-(defconst canna-conversion-backend
-  [ canna-init
+(defcustom canna-hostname "localhost"
+  "Hostname of CANNA server"
+  :group 'canna :type 'string)
 
-    canna-start-conversion
-      canna-get-bunsetsu-converted
-      canna-get-bunsetsu-source
-      canna-list-candidates
-          canna-get-number-of-candidates
-          canna-get-current-candidate-number
-          canna-get-all-candidates
-          canna-decide-candidate
-      canna-change-bunsetsu-length
-    canna-end-conversion
-    nil
+(defcustom canna-server-port "canna"
+  "A service name or a port number (should be a string) of CANNA server"
+  :group 'canna :type 'string)
 
-    canna-fini
- ])
+(defcustom canna-user-name nil
+  "User Name on CANNA server"
+  :group 'canna :type 'string)
 
-(defconst canna-server-port 5680 "Port number of Canna server")
-(defvar canna-hostname "localhost"
-  "Hostname of Canna server")
+(defcustom canna-group-name nil
+  "Group Name on CANNA server"
+  :group 'canna :type 'string)
 
-(defun canna-open (hostname)
-  "Establish the connection to CANNA server.  Return environment object."
-  (let* ((buf (generate-new-buffer " *CANNA*"))
-	 (proc (open-network-stream "CANNA" buf hostname canna-server-port))
-	 result)
-    (process-kill-without-query proc)
-    (set-process-coding-system proc 'no-conversion 'no-conversion)
-    (set-marker-insertion-type (process-mark proc) t)
-    (save-excursion
-      (set-buffer buf)
-      (erase-buffer)
-      (buffer-disable-undo)
-      (set-buffer-multibyte nil))
-    (setq result (cannarpc-open proc (user-login-name)))
-    (if (< result 0)
-	(let ((msg (cannarpc-get-error-message (- result))))
-	  (delete-process proc)
-	  (kill-buffer buf)
-	  (error "Can't open CANNA session (%s): %s" hostname msg)))
-    (vector proc result)))
+; (eval-when-compile
+;   (defmacro CANNA-const (c)
+;     (cond ((eq c 'FileNotExist) xxxxxxxxxxxxxx)
+; 	  )))
 
-;; XXX: Should support multiple outstanding context
-;; <env> ::= [ <proc> <context> ]
-(defvar canna-environment nil
+(egg-add-message
+ '((Japanese
+    (canna-connect-error  "$B%5!<%P$H@\B3$G$-$^$;$s$G$7$?(B")
+    (canna-fail-make-env  "$B4D6-$r:n$k$3$H$O$G$-$^$;$s$G$7$?(B")
+    (canna-dict-missing-1 "$B<-=q%U%!%$%k(B %s $B$,$"$j$^$;$s!#(B")
+    (canna-dict-missing-2 "$B<-=q%U%!%$%k(B %s $B$,$"$j$^$;$s!#:n$j$^$9$+(B? ")
+    (canna-dict-created   "$B<-=q%U%!%$%k(B %s $B$r:n$j$^$7$?(B")
+    (canna-dict-saving    "%s $B$NIQEY>pJs!&<-=q>pJs$rB`Hr$7$F$$$^$9(B")
+    (canna-dict-saved     "%s $B$NIQEY>pJs!&<-=q>pJs$rB`Hr$7$^$7$?(B")
+    (canna-register-1     "$BEPO?<-=qL>(B:")
+    (canna-register-2     "$BIJ;lL>(B"))))
+
+(defvar canna-hinshi-alist
+  '(("$B?ML>(B" . "#JN") ("$BCOL>(B" . "#CN") ("$B8GM-L>;l(B" . "#KK")
+    ("$B0lHLL>;l(B" . "#T35") ("$BL>;l(B($BNc(B)$B6/NO$J(B" . "#T15")
+    ("$B%5JQL>;l(B" . "#T30") ("$B%5JQL>;l(B($BNc(B)$B0B?4$J(B" . "#T10") ("$BC14A;z(B" . "#KJ")
+    ("$BF0;l%+9TJQ3J3hMQ(B" . "#KX") ("$BF0;l%s%69TJQ3J3hMQ(B" . "#NZX")
+    ("$BF0;l%69TJQ3J3hMQ(B" . "#ZX") ("$BF0;l%59TJQ3J3hMQ(B" . "#SX")
+    ("$BF0;l%+9T8^CJ3hMQ(B" . "#K5") ("$BF0;l%,9T8^CJ3hMQ(B" . "#G5")
+    ("$BF0;l%59T8^CJ3hMQ(B" . "#S5") ("$BF0;l%?9T8^CJ3hMQ(B" . "#T5")
+    ("$BF0;l%J9T8^CJ3hMQ(B" . "#N5") ("$BF0;l%P9T8^CJ3hMQ(B" . "#B5")
+    ("$BF0;l%^9T8^CJ3hMQ(B" . "#M5") ("$BF0;l%i9T8^CJ3hMQ(B" . "#R5")
+    ("$BF0;l%o9T8^CJ3hMQ(B" . "#W5") ("$BF0;l>e2<0lCJ3hMQ(B" . "#KS")
+    ("$BF0;l%+9T8^CJO"MQL>;l(B" . "#K5r") ("$BF0;l%,9T8^CJO"MQL>;l(B" . "#G5r")
+    ("$BF0;l%59T8^CJO"MQL>;l(B" . "#S5r") ("$BF0;l%?9T8^CJO"MQL>;l(B" . "#T5r")
+    ("$BF0;l%J9T8^CJO"MQL>;l(B" . "#N5r") ("$BF0;l%P9T8^CJO"MQL>;l(B" . "#B5r")
+    ("$BF0;l%^9T8^CJO"MQL>;l(B" . "#M5r") ("$BF0;l%i9T8^CJO"MQL>;l(B" . "#R5r")
+    ("$BF0;l%o9T8^CJO"MQL>;l(B" . "#W5r") ("$BF0;l>e2<0lCJ8l44L>;l(B" . "#KSr")
+    ("$B7AMF;l(B" . "#KY") ("$B7AMF;l(B($BNc(B)$B$-$$$m$$(B" . "#KYT")
+    ("$B7AMFF0;l(B" . "#T05")
+    ("$B7AMFF0;l(B($BNc(B)$B4X?4$@(B" . "#T10") ("$B7AMFF0;l(B($BNc(B)$BB?92$F$@(B" . "#T13")
+    ("$B7AMFF0;l(B($BNc(B)$B0U30$@(B" . "#T15") ("$B7AMFF0;l(B($BNc(B)$BJXMx$@(B" . "#T18")
+    ("$BI{;l(B" . "#F14") ("$BI{;l(B($BNc(B)$B$U$C$/$i(B" . "#F04")
+    ("$BI{;l(B($BNc(B)$B$=$C$H(B" . "#F12") ("$BI{;l(B($BNc(B)$BFMA3(B" . "#F06")
+    ("$B?t;l(B" . "#NN") ("$B@\B3;l!&46F0;l(B" . "#CJ") ("$BO"BN;l(B" . "#RT")))
+
+(defvar canna-hinshi-menu
+  '("$B?ML>(B" "$BCOL>(B" ("$BCDBN!&2q<RL>(B" . "$B8GM-L>;l(B") ("$BL>;l(B" . MEISHI)
+    ("$B%5JQL>;l(B" . SAHEN-MEISHI) "$BC14A;z(B" ("$BF0;l(B" . DOUSHI)
+    ("$B7AMF;l(B" . KEIYOUSHI) ("$B7AMFF0;l(B" . KEIYOUDOUSHI) ("$BI{;l(B" . FUKUSHI)
+    "$B?t;l(B" "$B@\B3;l!&46F0;l(B" "$BO"BN;l(B" ("$B$=$NB>$N8GM-L>;l(B" . "$B8GM-L>;l(B"))
+  "Menu data for a hinshi (a part of speech) selection.")
+
+(defun canna-hinshi-name (id &optional reverse)
+  (if reverse
+      (cdr (assoc id canna-hinshi-alist))
+    (car (rassoc id canna-hinshi-alist))))
+
+(defmacro canna-backend-plist ()
+  ''(egg-start-conversion          canna-start-conversion
+     egg-get-bunsetsu-source       canna-get-bunsetsu-source
+     egg-get-bunsetsu-converted    canna-get-bunsetsu-converted
+     egg-get-source-language       canna-get-source-language
+     egg-get-converted-language    canna-get-converted-language
+     egg-list-candidates           canna-list-candidates
+     egg-decide-candidate          canna-decide-candidate
+     egg-special-candidate         canna-special-candidate
+     egg-change-bunsetsu-length    canna-change-bunsetsu-length
+     egg-end-conversion            canna-end-conversion
+     egg-word-registration         canna-word-registration))
+
+(defconst canna-backend-language-alist nil)
+
+(defvar canna-backend-alist nil)
+
+(defun canna-backend-func-name (name lang &optional env)
+  (intern (concat name "-" (symbol-name lang)
+		  (and env "-") (and env (symbol-name env)))))
+
+(defun canna-make-backend (lang env &optional source-lang converted-lang)
+  (let ((finalize (canna-backend-func-name "canna-finalize-backend" lang))
+	(backend (canna-backend-func-name "canna-backend" lang env)))
+    (if (null (fboundp finalize))
+	(progn
+	  (fset finalize (function (lambda () (canna-finalize-backend))))
+	  (egg-set-finalize-backend (list finalize))))
+    (if (null (get backend 'egg-start-conversion))
+	(setplist backend (apply 'list
+				 'language lang
+				 'source-language (or source-lang lang)
+				 'converted-language (or converted-lang lang)
+				 (canna-backend-plist))))
+    backend))
+
+(defun canna-define-backend (lang env-name-list)
+  (mapcar (lambda (env)
+	    (if (consp env)
+		(canna-define-backend lang env)
+	      (canna-make-backend lang env)))
+	  env-name-list))
+
+(defun canna-define-backend-alist (deflist)
+  (setq canna-backend-alist
+	(mapcar (lambda (slot)
+		  (let* ((lang (car slot))
+			 (alt (cdr (assq lang canna-backend-language-alist))))
+		    (cons lang (canna-define-backend (or alt lang) (cdr slot)))))
+		deflist)))
+
+(defcustom canna-backend-define-list
+  '((Japanese    ((nil nil nil))
+		 ((Bushu Bushu Bushu))))
+  "Alist of Japanese language and lists of the Canna backend suffixes."
+  :group 'canna
+  :set (lambda (sym value)
+	 (set-default sym value)
+	 (canna-define-backend-alist value))
+  :type '(repeat
+	  (cons
+	   :tag "Language - Backend"
+	   (choice :tag "Language"
+		   (const Japanese)
+		   (symbol :tag "Other"))
+	   (repeat
+	    (cons
+	     :tag "Backend Sequece"
+	     (cons :tag "First Conversion Stage"
+		   (symbol :tag "Backend for Start Conversion")
+		   (repeat :tag "Backends for Reconvert"
+			   (symbol :tag "Backend")))
+	     (repeat
+	      :tag "Following Conversion Stages"
+	      (cons
+	       :tag "N-th Stage"
+	       (symbol :tag "Backend for This Stage")
+	       (repeat :tag "Backends for Reconvert"
+		       (symbol :tag "Backend")))))))))
+
+(defsubst canna-backend-get-language (backend)
+  (get backend 'language))
+
+(defsubst canna-backend-get-source-language (backend)
+  (get backend 'source-language))
+
+(defsubst canna-backend-get-converted-language (backend)
+  (get backend 'converted-language))
+
+(defvar canna-envspec-list nil)
+(defvar canna-current-envspec nil)
+
+;; Should support multiple outstanding context
+;; <env> ::= [ <proc> <context> <backend> <convert-mode> <nostudy> <dic-list> ]
+(defvar canna-environments nil
   "Environment for CANNA kana-kanji conversion")
 
-(defsubst cannaenv-get-proc (env)
-  (aref env 0))
-(defsubst cannaenv-get-context (env)
-  (aref env 1))
+(defun cannaenv-create (proc context &optional backend mode nostudy)
+  (vector proc context backend mode nostudy (list nil)))
 
-;; <bunsetsu> ::=
-;;  [ <env> <converted> <bunsetsu-pos>
-;;    <source> <zenkouho-pos> <zenkouho> ]
-(defsubst canna-make-bunsetsu (env converted bunsetsu-pos)
-  (vector env converted bunsetsu-pos nil nil nil))
+(defsubst cannaenv-get-proc (env)    (aref env 0))
+(defsubst cannaenv-get-context (env) (aref env 1))
+(defsubst cannaenv-get-backend (env) (aref env 2))
+(defsubst cannaenv-get-mode (env)    (aref env 3))
+(defsubst cannaenv-get-nostudy (env) (aref env 4))
+(defsubst cannaenv-get-dic-list (env) (cdr (aref env 5)))
 
-(defsubst cannabunsetsu-get-env (b)
-  (aref b 0))
-(defsubst cannabunsetsu-get-converted (b)
-  (aref b 1))
-(defsubst cannabunsetsu-get-bunsetsu-pos (b)
-  (aref b 2))
-(defsubst cannabunsetsu-get-source (b)
-  (aref b 3))
-(defsubst cannabunsetsu-set-source (b s)
-  (aset b 3 s))
-(defsubst cannabunsetsu-get-zenkouho-pos (b)
-  (aref b 4))
-(defsubst cannabunsetsu-set-zenkouho-pos (b p)
-  (aset b 4 p))
-(defsubst cannabunsetsu-get-zenkouho (b)
-  (aref b 5))
-(defsubst cannabunsetsu-set-zenkouho (b z)
-  (aset b 5 z))
+(defsubst cannaenv-add-dic-list (env &rest dic)
+  (nconc (aref env 5) (list (apply 'vector dic))))
+
+;; <canna-bunsetsu> ::=
+;;  [ <env> <converted> <bunsetsu-pos> <source>
+;;    <zenkouho-pos> <zenkouho> <zenkouho-converted> ]
+(defsubst canna-make-bunsetsu (env converted bunsetsu-pos source)
+  (egg-bunsetsu-create
+   (cannaenv-get-backend env)
+   (vector env converted bunsetsu-pos source nil nil nil)))
+
+(defsubst canna-bunsetsu-get-env (b)
+  (aref (egg-bunsetsu-get-info b) 0))
+(defsubst canna-bunsetsu-get-converted (b)
+  (aref (egg-bunsetsu-get-info b) 1))
+(defsubst canna-bunsetsu-get-bunsetsu-pos (b)
+  (aref (egg-bunsetsu-get-info b) 2))
+(defsubst canna-bunsetsu-get-source (b)
+  (aref (egg-bunsetsu-get-info b) 3))
+(defsubst canna-bunsetsu-set-source (b s)
+  (aset (egg-bunsetsu-get-info b) 3 s))
+(defsubst canna-bunsetsu-get-zenkouho-pos (b)
+  (aref (egg-bunsetsu-get-info b) 4))
+(defsubst canna-bunsetsu-set-zenkouho-pos (b p)
+  (aset (egg-bunsetsu-get-info b) 4 p))
+(defsubst canna-bunsetsu-get-zenkouho (b)
+  (aref (egg-bunsetsu-get-info b) 5))
+(defsubst canna-bunsetsu-set-zenkouho (b z)
+  (aset (egg-bunsetsu-get-info b) 5 z))
+(defsubst canna-bunsetsu-get-zenkouho-converted (b)
+  (aref (egg-bunsetsu-get-info b) 6))
+(defsubst canna-bunsetsu-set-zenkouho-converted (b zc)
+  (aset (egg-bunsetsu-get-info b) 6 zc))
 
 (defun canna-get-bunsetsu-source (b)
-  (let ((s (cannabunsetsu-get-source b)))
+  (let ((s (canna-bunsetsu-get-source b)))
     (or s
-	(let* ((env (cannabunsetsu-get-env b))
-	       (bp (cannabunsetsu-get-bunsetsu-pos b))
+	(let* ((env (canna-bunsetsu-get-env b))
+	       (bp (canna-bunsetsu-get-bunsetsu-pos b))
 	       (s (cannarpc-get-bunsetsu-source env bp)))
-	  (cannabunsetsu-set-source b s)))))
+	  (canna-bunsetsu-set-source b s)))))
+(defun canna-get-bunsetsu-converted (b) (canna-bunsetsu-get-converted b))
+(defun canna-get-source-language (b) 'Japanese)
+(defun canna-get-converted-language (b) 'Japanese)
 
-(defun canna-get-bunsetsu-converted (b)
-  (cannabunsetsu-get-converted b))
+(defun canna-envspec-create (env-name convert-mode nostudy)
+  (vector (and env-name (setq env-name (intern env-name)))
+	  (canna-make-backend egg-language env-name)
+	  convert-mode nostudy (list nil)))
 
-(defconst canna-dictionary-specification
-  '("iroha"
-    "fuzokugo"
-    "hojomwd"
-    "hojoswd"
-    "bushu"
-    "user"
-    )
-  "Dictionary specification of CANNA.")
+(defsubst canna-envspec-env-type (spec)           (aref spec 0))
+(defsubst canna-envspec-backend (spec)            (aref spec 1))
+(defsubst canna-envspec-mode (spec)               (aref spec 2))
+(defsubst canna-envspec-nostudy (spec)            (aref spec 3))
+(defsubst canna-envspec-dic-list (spec)           (cdr (aref spec 4)))
+
+(defsubst canna-envspec-add-dic-list (spec &rest dic)
+  (nconc (aref spec 4) (list (apply 'vector dic))))
+
+(defmacro canna-arg-type-error (func)
+  `(egg-error ,(format "%s: Wrong type argument" func)))
+
+(defun canna-define-environment (&optional env-name convert-mode nostudy)
+  "Define a Canna environment. ENV-NAME specifies suffix of the Canna
+environment name. CONVERT-MODE specifies including hiragana or
+katakana to candidates list. NOSTUDY specifies not study."
+  (if (and env-name (null (stringp env-name)))
+      (canna-arg-type-error canna-define-environment))
+  (setq canna-current-envspec (canna-envspec-create env-name
+						    convert-mode nostudy)
+	canna-envspec-list (nconc canna-envspec-list
+				  (list canna-current-envspec))))
+
+(defun canna-add-dict (dict dict-rw)
+  (canna-envspec-add-dic-list canna-current-envspec dict dict-rw))
+
+(defun canna-comm-sentinel (proc reason)	; assume it is close
+  (let ((inhibit-quit t))
+    (kill-buffer (process-buffer proc))
+    ;; delete env from the list.
+    (setq canna-environments
+	  (delq nil (mapcar (lambda (env)
+			      (if (null (eq (cannaenv-get-proc env) proc))
+				  env))
+			    canna-environments)))))
+
+(defun canna-open (hostname-list)
+  "Establish the connection to CANNA server.  Return environment object."
+  (let* ((save-inhibit-quit inhibit-quit)
+	 (inhibit-quit t)
+	 (proc-name "CANNA")
+	 (msg-form "Canna: connecting to %S at %s...")
+	 (user-name (or canna-user-name (user-login-name)))
+	 (id (shell-command-to-string "id"))
+	 (group (or canna-group-name
+		    (if (string-match "gid=[0-9]+(\\([^)]+\\))" id)
+			(match-string 1 id)
+		      "user")))
+	 buf hostname port proc result msg)
+    (unwind-protect
+	(progn
+	  (setq buf (generate-new-buffer " *CANNA*"))
+    (save-excursion
+      (set-buffer buf)
+      (erase-buffer)
+      (buffer-disable-undo)
+	    (set-buffer-multibyte nil)
+	    (setq egg-fixed-euc 'fixed-euc-jp))
+	  (or (consp hostname-list)
+	      (setq hostname-list (list hostname-list)))
+	  (while (and hostname-list (null proc))
+	    (setq hostname (or (car hostname-list) "")
+		  hostname-list (cdr hostname-list))
+	    (if (null (string-match ":" hostname))
+		(setq port canna-server-port)
+	      (setq port (substring hostname (match-end 0))
+		    hostname (substring hostname 0 (match-beginning 0))))
+	    (if (and (stringp port) (string-match "^[0-9]+$" port))
+		(setq port (string-to-int port)))
+	    (and (equal hostname "")
+		 (setq hostname (or (getenv "CANNAHOST") "localhost")))
+	    (let ((inhibit-quit save-inhibit-quit))
+	      (if (and msg
+		       (null (y-or-n-p (format "%s failed. Try to %s? "
+					       msg hostname))))
+		  (egg-error "abort connect")))
+	    (setq msg (format "Canna: connecting to %s..." hostname))
+	    (message "%s" msg)
+	    (let ((inhibit-quit save-inhibit-quit))
+	      (condition-case nil
+		  (setq proc (open-network-stream proc-name buf hostname port))
+		((error quit))))
+	    (when proc
+	      (process-kill-without-query proc)
+	      (set-process-coding-system proc 'binary 'binary)
+	      (set-process-sentinel proc 'canna-comm-sentinel)
+	      (set-marker-insertion-type (process-mark proc) t)
+	      (setq result (cannarpc-open proc user-name)) ;; result is context
+	      (if (= result -1)
+		  (progn
+	  (delete-process proc)
+		    (setq proc nil))
+		(cannarpc-notice-group-name proc result group)
+		(cannarpc-set-app-name proc result "EGG4"))))
+	  (cons proc result))
+      (if proc
+	  (message (concat msg "done"))
+	(if buf (kill-buffer buf))
+	(egg-error 'canna-connect-error)))))
 
 (defun canna-filename (p)
   ""
   (cond ((consp p) (concat (car p) "/" (user-login-name)))
 	(t p)))
 
-(defun canna-get-environment ()
+(defun canna-search-environment (backend)
+  (let ((env-list canna-environments)
+	env)
+    (while (and (null env) env-list)
+      (setq env (and (eq (cannaenv-get-backend (car env-list)) backend)
+		     (car env-list))
+	    env-list (cdr env-list)))
+    env))
+
+(defun canna-get-environment (backend)
   "Return the backend of CANNA environment."
-  (if canna-environment
-      canna-environment
-    (let* ((env (canna-open canna-hostname))
-	   (l canna-dictionary-specification)
-	   dict-list)
-      (while l
-	(let ((dic (car l))
-	      result)
-	  (setq result
-		(canna-open-dictionary env (canna-filename dic)))
-	  (if (= result 255)
-	      (error "Damedamedame")		; XXX
-	    (setq l (cdr l)))))
-      (setq canna-environment env))))
+  (let ((env (canna-search-environment backend))
+	proc context error)
+    (or env
+	(unwind-protect
+	    (let* ((language (canna-backend-get-language backend))
+		   specs)
+	      (setq proc (canna-open canna-hostname)
+		    context (cdr proc)
+		    proc (car proc)
+		    canna-envspec-list nil)
+	      (condition-case err
+		  (egg-load-startup-file 'canna language)
+		(egg-error
+		 (setq error err)
+		 (signal (car error) (cdr error))))
+	      (setq specs canna-envspec-list)
+	      (while specs
+		(canna-create-environment proc context (car specs))
+		(setq context nil)
+		(setq specs (cdr specs)))
+	      (setq env (canna-search-environment backend)))
+	  (when (and proc (null env))
+	    (cannarpc-close proc)
+	    (if error
+		(signal (car error) (cdr error))
+	      (egg-error 'canna-fail-make-env)))
+	    ))))
 
-(defun canna-open-dictionary (env name)
+(defun canna-create-environment (proc context spec)
+  (let* ((save-inhibit-quit inhibit-quit)
+	 (inhibit-quit t)
+	 (backend (canna-envspec-backend spec))
+	 (convert-mode (canna-envspec-mode spec))
+	 (nostudy (canna-envspec-nostudy spec))
+	 (dic-list (canna-envspec-dic-list spec))
+	 env)
+    (condition-case err
+	(progn
+	  (if (not context)
+	      (setq context (cannarpc-create-context proc)))
+	  (if (< context 0)
+	      (egg-error "%s" (cannarpc-get-error-message (- context))))
+	  (setq env (cannaenv-create proc context backend convert-mode nostudy))
+	  (let ((inhibit-quit save-inhibit-quit))
+	    (while dic-list
+	      (canna-set-dictionary env (car dic-list))
+	      (setq dic-list (cdr dic-list))))
+	  (setq canna-environments (nconc canna-environments (list env))))
+      ((egg-error quit)
+       (if (eq (car err) 'egg-error)
+	   (message "%s" (nth 1 err)))
+       (if env
+	   (progn
+	     (cannarpc-close-context env)
+	     (setq canna-environments (delq env canna-environments))))
+       (if (eq (car err) 'quit)
+	   (signal 'quit (cdr err)))))))
+
+(defun canna-set-dictionary (env dic-spec)
+  (let ((dname (aref dic-spec 0))
+	(drw   (aref dic-spec 1))
+	did result)
+    (if (= 0 (canna-open-dictionary env dname drw))
+	(cannaenv-add-dic-list env dname drw))))
+
+(defun canna-open-dictionary (env name rw)
   (let ((trying t)
 	ret)
     (while trying
       (setq ret (cannarpc-open-dictionary env name 0)) ; XXX MODE=0
       (if (= ret 0)
 	  (setq trying nil)
-	(message "$B<-=q%U%!%$%k(B(%s)$B$,$"$j$^$;$s(B" name)
-	(setq ret (- ret))		; Get error code.
+	(message (egg-get-message 'canna-dict-missing-1) name)
+	(if rw
 	(if (and (y-or-n-p
-		  (format "$B<-=q%U%!%$%k(B(%s)$B$,$"$j$^$;$s!#:n$j$^$9$+(B? "
-			  name))
+		      (format (egg-get-message 'canna-dict-missing-2) name))
 		 (= (cannarpc-make-dictionary env name) 0))
-	    (message "$B<-=q%U%!%$%k(B(%s)$B$r:n$j$^$7$?(B" name)
-	  (error "Fatal"))))
+		(message (egg-get-message 'canna-dict-created) name)
+	      (message "%s" (cannarpc-get-error-message (- ret))))
+	  (setq trying nil))))
     ret))
 
+(defun canna-save-dictionaries (env)
+  (let ((dic-list (canna-list-writable-dictionaries-byname env))
+	dic)
+    (while dic-list
+      (setq dic (car dic-list)
+	    dic-list (cdr dic-list))
+      (cannarpc-save-dictionary env dic))))
+
 (defun canna-init ()
   )
 
-(defun canna-start-conversion (yomi lang)
+(defun canna-set-converted-yomi (bunsetsu-pos bunsetsu-list)
+  (let ((bl bunsetsu-list)
+	(i bunsetsu-pos)
+	b)
+    (while bl
+      (setq b (car bl))
+      (canna-bunsetsu-set-source b (cannarpc-get-bunsetsu-source env i))
+      (setq i (1+ i)
+	    bl (cdr bl)))
+    bunsetsu-list))
+
+(defun canna-start-conversion (backend yomi &optional context)
   "Convert YOMI string to kanji, and enter conversion mode.
 Return the list of bunsetsu."
-  (if (eq lang 'Japanese)
-      (let ((env (canna-get-environment)))
-	(cannarpc-begin-conversion env yomi))
-    (signal 'lang-not-supported)))    
+  (let* ((env (canna-get-environment backend))
+	 (bunsetsu-list (cannarpc-begin-conversion env yomi)))
+    (if (numberp bunsetsu-list) ; XXX error $B$N=hM}E,Ev(B
+	(progn
+	  (if (= -1 (cannarpc-cancel-conversion env))
+	      (progn
+	  (setq env (canna-get-environment backend))
+		(canna-finalize-backend)))
+	  (setq bunsetsu-list (cannarpc-begin-conversion env yomi))))
+    (canna-set-converted-yomi 0 bunsetsu-list)))
 
 (defun canna-end-conversion (bunsetsu-list abort)
-  (let* ((env (cannabunsetsu-get-env (car bunsetsu-list)))
+  (let* ((env (canna-bunsetsu-get-env (car bunsetsu-list)))
 	 (l bunsetsu-list)
 	 (len (length bunsetsu-list))
 	 (zenkouho-pos-vector (make-vector (* 2 len) 0))
 	 (i 0)
-	 (mode 1) ;XXX MODE=1 attru?
+	 (mode (if (cannaenv-get-nostudy env) 0 1)) ; MODE=1 $B3X=,(B  0 $B$7$J$$(B
 	 bunsetsu zenkouho-pos)
     (if abort
 	(setq mode 0))
     (while l
       (setq bunsetsu (car l))
       (setq l (cdr l))
-      (setq zenkouho-pos (cannabunsetsu-get-zenkouho-pos bunsetsu))
+      (setq zenkouho-pos (canna-bunsetsu-get-zenkouho-pos bunsetsu))
       (if (null zenkouho-pos)
 	  () ; XXX: NIL--> 0 atteru???
 	(aset zenkouho-pos-vector i 0)	; XXX Don't support >=256
 	(aset zenkouho-pos-vector (1+ i) zenkouho-pos))
       (setq i (+ i 2)))
-    (cannarpc-end-conversion env len zenkouho-pos-vector 0)))
+    (cannarpc-end-conversion env len zenkouho-pos-vector mode)))
 
-(defun canna-list-candidates (bunsetsu prev-bunsetsu)
-  (let* ((env (cannabunsetsu-get-env bunsetsu))
-	 (bunsetsu-pos (cannabunsetsu-get-bunsetsu-pos bunsetsu))
-	 (z (cannarpc-get-bunsetsu-candidates env bunsetsu-pos)))
-    (cannabunsetsu-set-zenkouho bunsetsu z)
-    (cannabunsetsu-set-zenkouho-pos bunsetsu 0)
-    0))
+(defun canna-list-candidates (bunsetsu prev-b next-b major)
+  (setq bunsetsu (car bunsetsu))
+  (if (canna-bunsetsu-get-zenkouho bunsetsu)
+      (cons (canna-bunsetsu-get-zenkouho-pos bunsetsu)
+	    (canna-bunsetsu-get-zenkouho-converted bunsetsu))
+    (let* ((env (canna-bunsetsu-get-env bunsetsu))
+	   (yomi (canna-get-bunsetsu-source bunsetsu))
+	   (bunsetsu-pos (canna-bunsetsu-get-bunsetsu-pos bunsetsu))
+	   (z (cannarpc-get-bunsetsu-candidates env bunsetsu-pos yomi)))
+      (canna-bunsetsu-set-zenkouho bunsetsu z)
+      (cons (canna-bunsetsu-set-zenkouho-pos bunsetsu 0)
+	    (canna-bunsetsu-set-zenkouho-converted
+	     bunsetsu
+	     (mapcar 'canna-bunsetsu-get-converted z))))))
 
+;;; XXX not use ?
 (defun canna-get-number-of-candidates (bunsetsu)
-  (let ((l (cannabunsetsu-get-zenkouho bunsetsu)))
+  (let ((l (canna-bunsetsu-get-zenkouho bunsetsu)))
     (if l
 	(length l)
       nil)))
 
-(defun canna-decide-candidate (bunsetsu candidate-pos)
-  (let* ((candidate-list (cannabunsetsu-get-zenkouho bunsetsu))
-	 (candidate (nth candidate-pos candidate-list)))
-    (cannabunsetsu-set-zenkouho candidate candidate-list)
-    (cannabunsetsu-set-zenkouho-pos candidate candidate-pos)
-    candidate))
+(defun canna-decide-candidate (bunsetsu pos prev-b next-b)
+  (let* ((head (car bunsetsu))
+	 (candidate-list (canna-bunsetsu-get-zenkouho head))
+	 (candidate (nth pos candidate-list)))
+    (canna-bunsetsu-set-zenkouho candidate candidate-list)
+    (canna-bunsetsu-set-zenkouho-pos candidate pos)
+    (canna-bunsetsu-set-zenkouho-converted
+     candidate (canna-bunsetsu-get-zenkouho-converted head))
+    (list (list candidate))))
 
+(defun canna-special-candidate (bunsetsu prev-b next-b major type)
+  (let* ((head (car bunsetsu))
+	 (env (canna-bunsetsu-get-env head))
+	 (backend (egg-bunsetsu-get-backend head))
+	 (lang (get backend 'language))
+	 source converted zenkouho-list kouho-list pos)
+    (when (and (eq lang (get backend 'source-language))
+	       (eq lang (get backend 'converted-language)))
+      (cond ((eq lang 'Japanese)
+	     (setq source (canna-get-bunsetsu-source head))
+	     (cond ((eq type 'egg-hiragana)
+		    (setq converted source))
+		   ((eq type 'egg-katakana)
+		    (setq converted (japanese-katakana source))))
+	     (setq zenkouho-list
+		   (cdr (canna-list-candidates bunsetsu prev-b next-b major)))
+	     (setq pos
+		   (when (setq kouho-list (member converted zenkouho-list))
+		     (- (length zenkouho-list) (length kouho-list))))))
+      (when pos
+	(canna-decide-candidate bunsetsu pos prev-b next-b)))))
+
+;;; XXX not used ?
 (defun canna-get-current-candidate-number (bunsetsu)
-  (cannabunsetsu-get-zenkouho-pos bunsetsu))
+  (canna-bunsetsu-get-zenkouho-pos bunsetsu))
 
+;;; XXX not used ?
 (defun canna-get-all-candidates (bunsetsu)
-  (let* ((l (cannabunsetsu-get-zenkouho bunsetsu))
+  (let* ((l (canna-bunsetsu-get-zenkouho bunsetsu))
 	 (result (cons nil nil))
 	 (r result))
     (catch 'break
       (while t
 	(let ((candidate (car l)))
-	  (setcar r (cannabunsetsu-get-converted candidate))
+	  (setcar r (canna-bunsetsu-get-converted candidate))
 	  (if (null (setq l (cdr l)))
 	      (throw 'break nil)
 	    (setq r (setcdr r (cons nil nil)))))))
     result))
 
-;;;;;;;;;;;;;;;;;;;;;;; MADAMADA zenzendame, just copy from SJ3
-(defun canna-change-bunsetsu-length (b0 b1 b2 len)
-  (let ((yomi (concat
-	       (cannabunsetsu-get-source b1)
-	       (if b2 (cannabunsetsu-get-source b2))))
-	(env (cannabunsetsu-get-env b1))
-	yomi1 yomi2
-	bunsetsu1 bunsetsu2)
-    (setq yomi1 (substring yomi 0 len)
-	  yomi2 (substring yomi len))
-    (setq bunsetsu1
-	  (cannarpc-tanbunsetsu-conversion env yomi1))
-    ;; Only set once (memory original length of the bunsetsu).
-    (cannabunsetsu-set-kugiri-changed bunsetsu1
-				    (or (cannabunsetsu-get-kugiri-changed b1)
-					(length (cannabunsetsu-get-source b1))))
-    (if (< 0 (length yomi2))
-	(setq bunsetsu2 (cannarpc-tanbunsetsu-conversion env yomi2))
-      (setq bunsetsu2 nil))
-    (if bunsetsu2
-	(list bunsetsu1 bunsetsu2)
-      (list bunsetsu1))))
+(defun canna-change-bunsetsu-length (bunsetsu prev-b next-b len major)
+  (let* ((env (canna-bunsetsu-get-env (car bunsetsu)))
+	 (yomi (canna-get-bunsetsu-source (car bunsetsu)))
+	 (yomi-length (cond ((< (length yomi) len) -1)
+			    ((> (length yomi) len) -2)
+			    (t nil)))
+	 (bunsetsu-pos (canna-bunsetsu-get-bunsetsu-pos (car bunsetsu)))
+	 new)
+    (if yomi-length
+	(setq new (canna-set-converted-yomi
+		   bunsetsu-pos
+		   (cannarpc-set-kugiri-changed env yomi-length bunsetsu-pos)))
+      (setq new bunsetsu))
+    (list (list (car new)) prev-b (cdr new))))
 
-;;;;;;;;;;;;;; MADAMADA
-(defun canna-fini ()
-)
+(defun canna-finalize-backend (&optional action)
+  (let* ((save-inhibit-quit inhibit-quit)
+	 (inhibit-quit t)
+	 (env-list canna-environments)
+	 env proc-list saved)
+    (while env-list
+      (setq env (car env-list)
+	    env-list (cdr env-list))
+      (condition-case err
+	  (progn
+	    (unless (memq (cannaenv-get-proc env) proc-list)
+	      (setq proc-list (cons (cannaenv-get-proc env) proc-list)))
+	    (unless (eq action 'disconnect-only)
+	      (unless saved
+		(setq saved t)
+		(message (egg-get-message 'canna-dict-saving) "Canna"))
+	      (let ((inhibit-quit save-inhibit-quit))
+		(canna-save-dictionaries env)))
+	    (unless (eq action 'save-only)
+	      (cannarpc-close-context env)))
+	((error quit)
+	 (message "signal %S occured when dictionary saving" err))))
+    (if saved
+	(message (egg-get-message 'canna-dict-saved) "Canna"))
+    (unless (eq action 'save-only)
+      (while proc-list
+	(if (and (car proc-list)
+		 (eq (process-status (car proc-list)) 'open))
+	    (cannarpc-close (car proc-list)))
+	(setq proc-list (cdr proc-list)))))
+  (setq canna-environments nil))
+
+;;; word registration
+
+(defun canna-list-writable-dictionaries-byname (env)
+  (let ((dic-list (cannaenv-get-dic-list env)))
+    (delq nil
+	  (mapcar (lambda (dic)
+		    (let ((dname (aref dic 0))
+			  (drw   (aref dic 1)))
+		      (and drw dname)))
+		  dic-list))))
+
+(defun canna-dictionary-select (env)
+  (let ((dic-list (canna-list-writable-dictionaries-byname env)))
+    (if (= 1 (length dic-list))
+	(car dic-list)
+      (menudiag-select (list 'menu
+			     (egg-get-message 'canna-register-1)
+			     dic-list)))))
+
+(defun canna-hinshi-MEISHI (kanji yomi)
+  (if (y-or-n-p (concat "$B!V(B" kanji "$B$J!W$O@5$7$$$G$9$+!#(B")) "#T15" "#T35"))
+
+(defun canna-hinshi-SAHEN-MEISHI (kanji yomi)
+  (if (y-or-n-p (concat "$B!V(B" kanji "$B$J!W$O@5$7$$$G$9$+!#(B")) "#T10" "#T30"))
+
+(defmacro canna-hinshi-DOUSHI-check-gobi ()
+  '(progn
+     (setq i 0)
+     (while (> 9 i)
+       (if (string-match (concat (substring gobi i (1+ i)) "$") kanji)
+	   (progn
+	     (setq renyou  (substring re-gobi i (1+ i)))
+	     (setq mizen   (substring mi-gobi i (1+ i)))
+	     (setq kanji-gobi   (substring kanji (match-beginning 0)))
+	     (setq kanji-gokan (substring kanji 0 (match-beginning 0)))
+	     (setq ret (nth i hinshi))
+	     (setq i 9)))
+       (setq i (1+ i)))
+     (setq i 0)
+     (while (> 9 i)
+       (if (string-match (concat (substring gobi i (1+ i)) "$") yomi)
+	   (progn
+	     (setq yomi-gobi  (substring yomi (match-beginning 0)))
+	     (setq yomi-gokan (substring yomi 0 (match-beginning 0)))
+	     (setq i 9)))
+       (setq i (1+ i)))))
+
+(defun canna-hinshi-DOUSHI (kanji yomi)
+  (let ((gobi    "$B$/$0$9$D$L$V$`$k$&(B")
+	(re-gobi "$B$-$.$7$A$K$S$_$j$$(B")
+	(mi-gobi "$B$+$,$5$?$J$P$^$i$o(B")
+	(hinshi (list "#K5" "#G5" "#S5" "#T5" "#N5" "#B5" "#M5" "#R5" "#W5"))
+	kanji-gokan yomi-gokan kanji-gobi yomi-gobi mizen renyou
+	i ret1 ret2 ret)
+    (canna-hinshi-DOUSHI-check-gobi)
+    (if (not (and (> (length kanji) 1) (> (length yomi) 1)
+		  (and kanji-gobi yomi-gobi (equal kanji-gobi yomi-gobi))))
+	(if (and kanji-gobi yomi-gobi)
+	    (egg-error "$BFI$_$H8uJd$N3hMQ$,0c$$$^$9!#F~NO$7$J$*$7$F$/$@$5$$!#(B")
+	  (egg-error "$BFI$_$H8uJd$r=*;_7A$GF~NO$7$F$/$@$5$$!#(B")))
+    (cond ((and (> (length kanji) 2) (> (length yomi) 2)
+		(string-match "$B$/$k(B$" kanji) (string-match "$B$/$k(B$" yomi))
+	   (setq ret "#KX")
+	   (setq kanji-gokan (substring kanji 0 (- (length kanji) 2)))
+	   (setq yomi-gokan  (substring yomi  0 (- (length  yomi) 2))))
+	  ((and (> (length kanji) 3) (> (length yomi) 3)
+		(string-match "$B$s$:$k(B$" kanji) (string-match "$B$s$:$k(B$" yomi))
+	   (setq ret "#NZX")
+	   (setq kanji-gokan (substring kanji 0 (- (length kanji) 3)))
+	   (setq yomi-gokan  (substring yomi  0 (- (length  yomi) 3))))
+	  ((and (> (length kanji) 2) (> (length yomi) 2)
+		(string-match "$B$:$k(B$" kanji) (string-match "$B$:$k(B$" yomi))
+	   (setq ret "#ZX")
+	   (setq kanji-gokan (substring kanji 0 (- (length kanji) 2)))
+	   (setq yomi-gokan  (substring yomi  0 (- (length  yomi) 2))))
+	  ((and (> (length kanji) 2) (> (length yomi) 2)
+		(string-match "$B$9$k(B$" kanji) (string-match "$B$9$k(B$" yomi))
+	   (setq ret "#SX")
+	   (setq kanji-gokan (substring kanji 0 (- (length kanji) 2)))
+	   (setq yomi-gokan  (substring yomi  0 (- (length  yomi) 2)))))
+    (if (not (string-match "5$" ret))
+	(if (y-or-n-p (concat "$B!X(B" kanji "$B!Y$r(B (" (canna-hinshi-name ret)
+			      ") $B$H$7$FEPO?$7$^$9$+(B? "))
+	    (setq ret (list kanji-gokan yomi-gokan ret))
+	  (setq ret "#R5")
+	  (setq kanji-gokan (substring kanji 0 (- (length kanji) 1)))
+	  (setq yomi-gokan  (substring yomi  0 (- (length  yomi) 1)))))
+    (if (listp ret)
+	ret
+      (if (y-or-n-p "$B$5$i$K:Y$+$$IJ;lJ,$1$N$?$a$N<ALd$r$7$F$bNI$$$G$9$+(B? ")
+	  (progn
+	    (setq ret1 (y-or-n-p (concat "$B!V(B" kanji-gokan mizen
+					 "$B$J$$!W$O@5$7$$$G$9$+!#(B")))
+	    (setq i 0)
+	    (if (eq "#R5" ret)
+		(while (> 9 i)
+		  (if (string-match (concat (substring re-gobi i (1+ i)) "$")
+				    kanji-gokan)
+		      (progn (setq renyou nil)
+			     (setq i 9)))
+		  (setq i (1+ i))))
+	    (setq ret2 (y-or-n-p (concat "$B!V(B" kanji-gokan renyou
+					 "$B$,$$$$!W$O@5$7$$$G$9$+!#(B")))
+	    (setq ret (if ret1 (if ret2 (concat ret "r") ret)
+			(if ret2 "#KSr" "#KS")))))
+      (list kanji-gokan yomi-gokan ret))))
+
+(defun canna-hinshi-KEIYOUSHI (kanji yomi)
+  (let (ret)
+    (if (not (and (> (length kanji) 1) (> (length yomi) 1)
+		  (string-match "$B$$(B$" yomi) (string-match "$B$$(B$" kanji)))
+	(egg-error "$BFI$_$H8uJd$r(B $B=*;_7A$GF~NO$7$F$/$@$5$$!#Nc(B) $BAa$$(B"))
+    (setq kanji (substring kanji 0 (1- (length kanji))))
+    (setq yomi (substring yomi 0 (1- (length yomi))))
+    (setq ret
+	  (if (y-or-n-p "$B$5$i$K:Y$+$$IJ;lJ,$1$N$?$a$N<ALd$r$7$F$bNI$$$G$9$+(B? ")
+	      (if (y-or-n-p (concat "$B!V(B" kanji "$B!W$O@5$7$$$G$9$+!#(B"))
+		  "#KYT" "#KY")
+	    "#KY"))
+    (list kanji yomi ret)))
+
+(defun canna-hinshi-KEIYOUDOUSHI (kanji yomi)
+  (let (ret1 ret2 ret)
+    (if (not (and (> (length kanji) 1) (> (length yomi) 1)
+		  (string-match "$B$@(B$" yomi) (string-match "$B$@(B$" kanji)))
+	(egg-error "$BFI$_$H8uJd$r(B $B=*;_7A$GF~NO$7$F$/$@$5$$!#Nc(B) $B@E$+$@(B"))
+    (setq kanji (substring kanji 0 (1- (length kanji))))
+    (setq yomi (substring yomi 0 (1- (length yomi))))
+    (setq ret
+	  (if (y-or-n-p "$B$5$i$K:Y$+$$IJ;lJ,$1$N$?$a$N<ALd$r$7$F$bNI$$$G$9$+(B? ")
+	      (progn
+		(setq ret1 (y-or-n-p
+			    (concat "$B!V(B" kanji "$B$9$k!W$O@5$7$$$G$9$+!#(B")))
+		(setq ret2 (y-or-n-p
+			    (concat "$B!V(B" kanji "$B$,$"$k!W$O@5$7$$$G$9$+!#(B")))
+		(if ret1 (if ret2 "#T10" "#T13") (if ret2 "#T15" "#T18")))
+	    "#T05"))
+    (list kanji yomi ret)))
+
+(defun canna-hinshi-FUKUSHI (kanji yomi)
+  (let (ret1 ret2)
+    (if (y-or-n-p "$B$5$i$K:Y$+$$IJ;lJ,$1$N$?$a$N<ALd$r$7$F$bNI$$$G$9$+(B? ")
+	(progn
+	  (setq ret1 (y-or-n-p (concat "$B!V(B" kanji "$B$9$k!W$O@5$7$$$G$9$+!#(B")))
+	  (setq ret2 (y-or-n-p (concat "$B!V(B" kanji "$B$H!W$O@5$7$$$G$9$+!#(B")))
+	  (if ret1 (if ret2 "#F04" "#F12") (if ret2 "#F06" "#F14")))
+      "#F14")))
+
+(defun canna-hinshi-select (kanji yomi)
+  (let ((key (menudiag-select (list 'menu
+				    (egg-get-message 'canna-register-2)
+				    canna-hinshi-menu))))
+    (cond ((symbolp key) (funcall
+			  (intern (concat "canna-hinshi-" (symbol-name key)))
+			  kanji yomi))
+	  ((stringp key) (cdr (assoc key canna-hinshi-alist))))))
+
+(defun canna-word-registration (backend kanji yomi)
+  "Register a word KANJI with a pronunciation YOMI."
+  (if (or (null (eq (egg-get-language 0 kanji)
+		    (canna-get-converted-language backend)))
+	  (next-single-property-change 0 'egg-lang kanji)
+	  (null (eq (egg-get-language 0 yomi)
+		    (canna-get-source-language backend)))
+	  (next-single-property-change 0 'egg-lang yomi))
+      (egg-error "word registration: invalid character")
+    (let* ((env (canna-get-environment backend))
+	   (dic (canna-dictionary-select env))
+	   (hinshi-id (canna-hinshi-select kanji yomi))
+	   result)
+      (if (listp hinshi-id)
+	  (progn (setq kanji     (car hinshi-id))
+		 (setq yomi      (nth 1 hinshi-id))
+		 (setq hinshi-id (nth 2 hinshi-id))))
+      (setq result (cannarpc-add-word env dic yomi kanji hinshi-id))
+      (if (>= result 0)
+	  (progn
+	    (cannarpc-save-dictionary env dic)
+	    (list (canna-hinshi-name hinshi-id) dic))
+	(egg-error (cannarpc-get-error-message (- result)))))))
+
+;;; word delete registration
+
+(defun canna-word-delete-regist (backend yomi)
+  "Delete a word KANJI from dictionary."
+  (if (= (length yomi) 0)
+      (egg-error "Canna word delete registration: null string"))
+  (let* ((env (canna-get-environment backend))
+	 (dic (canna-dictionary-select env))
+	 proc context envd bunsetsu bunsetsu-pos z zpos kouho-list hinshi i
+	 kanji lex result)
+    (setq proc (cannaenv-get-proc env))
+    (setq context (cannarpc-create-context proc))
+    (setq envd (cannaenv-create proc context
+				'canna-backend-Japanese-tmp-delete-regist
+				1 t))
+    (canna-set-dictionary envd (vector dic t))
+    (canna-set-dictionary envd (vector "fuzokugo" nil))
+    (setq bunsetsu (car (cannarpc-begin-conversion envd yomi)))
+    (setq bunsetsu-pos (canna-bunsetsu-get-bunsetsu-pos bunsetsu))
+    (setq z (cannarpc-get-bunsetsu-candidates envd bunsetsu-pos yomi))
+    (canna-bunsetsu-set-zenkouho bunsetsu z)
+    (canna-bunsetsu-set-zenkouho-pos bunsetsu 0)
+    (setq kouho-list
+	  (canna-bunsetsu-set-zenkouho-converted
+	   bunsetsu
+	   (mapcar 'canna-bunsetsu-get-converted z)))
+    (setq yomi  (car (last kouho-list)))
+    (setq kouho-list (cdr (reverse kouho-list)))
+    (setq kouho-list (reverse kouho-list))
+    (setq i 0)
+    (setq kouho-list (mapcar '(lambda (k)
+				(prog1
+				    (cons k i)
+				  (setq i (1+ i))))
+			     kouho-list))
+    (let ((hiragana (assoc yomi kouho-list))
+	  hinshi)
+      (if hiragana
+	  (setq hinshi (cannarpc-get-hinshi envd bunsetsu-pos (cdr hiragana))))
+      (if (stringp hinshi)
+	  (if (equal "#T35" hinshi)
+	      (setq kouho-list (delete hiragana kouho-list)))
+	(setq kouho-list (delete hiragana kouho-list))))
+    (cond
+     ((null kouho-list)
+      (cannarpc-close-context envd)
+      (egg-error "$BEPO?$5$l$F$$$^$;$s!#(B"))
+     ((eq 1 (length kouho-list))
+      (setq zpos 0)
+      (setq kanji (car (car kouho-list))))
+     (t
+      (setq kanji (menudiag-select (list 'menu "$B:o=|(B:" kouho-list) nil nil t))
+      (setq zpos (cdr (car kanji)))
+      (setq kanji (car (car kanji)))))
+    (setq hinshi (cannarpc-get-hinshi envd bunsetsu-pos zpos))
+    (setq lex (cannarpc-get-lex envd bunsetsu-pos zpos))
+    (cannarpc-cancel-conversion envd)
+    (if (string-match "#[^#]+" hinshi)
+	(setq hinshi (substring hinshi 0 (match-end 0)))
+      (egg-error "$BIJ;l>pJs$,<hF@$G$-$^$;$s!#(B"))
+    (setq kanji (substring kanji 0 (nth 1 (car lex))))
+    (setq yomi (substring yomi 0 (car (car lex))))
+    (if (y-or-n-p (concat "$B!X(B" kanji "$B!Y(B(" yomi ": "
+			  (canna-hinshi-name hinshi) ")$B$r(B "
+			  dic " $B$+$i:o=|$7$^$9$+(B? "))
+	(setq result
+	      (cannarpc-delete-word envd dic yomi kanji hinshi))
+      (setq result -1))
+    (if (>= result 0)
+	(progn
+	  (cannarpc-save-dictionary envd dic)
+	  (cannarpc-close-context envd)
+	  (list kanji yomi (canna-hinshi-name hinshi) dic))
+      (cannarpc-close-context envd)
+      (egg-error "$B:o=|$5$l$^$;$s$G$7$?!#(B"))
+    ))
 
 ;;; setup
-(require 'egg)
+(load "egg/cannarpc")
+(run-hooks 'canna-load-hook)
 
 ;;;###autoload
 (defun egg-activate-canna (&rest arg)
-  "Activate CANNA backend of Tamagotchy."
-  (setq egg-conversion-backend canna-conversion-backend)
-  (if (not (fboundp 'cannarpc-open))
-      (load-library "egg/canna"))
-  (apply 'egg-mode arg))
+  "Activate CANNA backend of Tamago 4."
+  (apply 'egg-mode (append arg canna-backend-alist)))
 
 ;;; egg/canna.el ends here.
Index: egg/cannarpc.el
===================================================================
RCS file: /cvs/tamago/tamago/egg/cannarpc.el,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -d -u -p -r1.1.1.1 -r1.2
--- egg/cannarpc.el	27 Jan 2001 18:45:24 -0000	1.1.1.1
+++ egg/cannarpc.el	27 Jan 2001 18:53:13 -0000	1.2
@@ -45,17 +45,31 @@
 	  ((eq c 'GetDirectoryList)      7)
 	  ((eq c 'MountDictionary)       8)
 	  ((eq c 'UnmountDictionary)       9)
+	  ((eq c 'GetMountDictionaryList) 11)
+	  ((eq c 'DefineWord)		  13)
+	  ((eq c 'DeleteWord)		  14)
 	  ((eq c 'BeginConvert)         15)
 	  ((eq c 'EndConvert)           16)
 	  ((eq c 'GetCandidacyList)     17)
 	  ((eq c 'GetYomi)              18)
 	  ((eq c 'ResizePause)          26)
+	  ((eq c 'GetHinshi)		  27)
+	  ((eq c 'GetLex)		  28)
+	  ((eq c 'SetApplicationName)	  33)
+	  ((eq c 'NoticeGroupName)        34)
 
 	  ((eq c 'CreateDictionary)      3)
+	  ((eq c 'Sync)			   8)
 	  (t (error "No such constant")))))
 
+;; XXX
+(defconst cannarpc-error-message (vector ))
+
 (defun cannarpc-get-error-message (errno)
-  (or (aref cannarpc-error-message errno) (format "#%d" errno)))
+  (or (and (>= errno 0)
+	   (< errno (length cannarpc-error-message))
+	   (aref cannarpc-error-message errno))
+      (format "#%d" errno)))
 
 (defmacro cannarpc-call-with-environment (e vlist send-expr &rest receive-exprs)
   (let ((v (append
@@ -73,54 +87,101 @@
 	   (goto-char (prog1 (point) (accept-process-output proc))))
 	receive-exprs))))
 
-(defconst canna-version-fmt "2.0:%s")
+(defconst canna-version-fmt "3.3:%s")
 
 (defun cannarpc-open (proc username)
   "Open the session.  Return 0 on success, error code on failure."
   (let ((verusr (format canna-version-fmt username)))
-    (comm-call-with-proc proc (result)
-      (comm-format (u u v) (canna-const Initialize) (length verusr) verusr)
-      (comm-unpack (u) result)
-      result)))
+    (comm-call-with-proc proc (minor context)
+      (comm-format (u u s) (canna-const Initialize) (+ (length verusr) 1)
+		   verusr)
+      (comm-unpack (w w) minor context)
+      (cond ((and (= minor 65535) (= context 65535))
+	     -1)			; failure
+	    ((and (= minor 65535) (= context 65534))
+	     -1)			; version miss match
+	    (t context)))))
 
 (defun cannarpc-close (proc)
   (comm-call-with-proc proc (dummy result)
     (comm-format (b b w) (canna-const Finalize) 0 0)
-    (comm-unpack (b b w b) dummy dummy dummy result)
-    result))
+    (comm-unpack (u b) dummy result)
+    (if (= result 255)
+	-1				; failure
+      result)))
 
 (defun cannarpc-create-context (proc)
   (comm-call-with-proc proc (dummy result)
     (comm-format (b b w) (canna-const CreateContext) 0 0)
-    (comm-unpack (b b w w) dummy dummy dummy result)
-    result))
+    (comm-unpack (u w) dummy result)
+    (if (= result 65535)
+	-1				; failure
+      result)))
 
-(defun cannarpc-close-context (proc context)
-  (comm-call-with-proc proc (dummy result)
+(defun cannarpc-close-context (env)
+  (cannarpc-call-with-environment env (dummy result)
     (comm-format (b b w w) (canna-const CloseContext) 0 2 context)
-    (comm-unpack (b b w b) dummy dummy dummy result)
-    result))
+    (comm-unpack (u b) dummy result)
+    (if (= result 255)
+	-1				; failure
+      result)))
 
-;; XXX: Not implemented fully
 (defun cannarpc-get-dictionary-list (env)
-  (cannarpc-call-with-environment env (dymmy result)
+  (let ((i 0)
+	dic dl dic-list)
+    (cannarpc-call-with-environment env (dummy result)
     (comm-format (b b w w w) (canna-const GetDictionaryList) 0 4
 		 context 1024)
     (comm-unpack (u w) dummy result)
     ;; follow list of dictionaries
-    result))
+      (if (= result 65535)
+	  -1				; failure
+	(while (< i result)
+	  (comm-unpack (s) dic)
+	  (if dl
+	      (setq dl (setcdr dl (cons dic nil)))
+	    (setq dic-list (setq dl (cons dic nil))))
+	  (setq i (1+ i)))
+	dic-list))))
 
-;; XXX: Not implemented fully
 (defun cannarpc-get-directory-list (env)
-  (cannarpc-call-with-environment env (dymmy result)
+  (let ((i 0)
+	dir dl dir-list)
+    (cannarpc-call-with-environment env (dummy result)
     (comm-format (b b w w w) (canna-const GetDirectoryList) 0 4
 		 context 1024)
     (comm-unpack (u w) dummy result)
     ;; follow list of directories
-    result))
+      (if (= result 65535)
+	  -1				; failure
+	(while (< i result)
+	  (comm-unpack (s) dir)
+	  (if dl
+	      (setq dl (setcdr dl (cons dir nil)))
+	    (setq dir-list (setq dl (cons dir nil))))
+	  (setq i (1+ i)))
+	dir-list))))
+
+(defun cannarpc-get-mount-dictionary-list (env)
+  (let ((i 0)
+	dic dl dic-list)
+    (cannarpc-call-with-environment env (dummy result)
+      (comm-format (b b w w w) (canna-const GetMountDictionaryList) 0 4
+		   context 1024)
+      (comm-unpack (u w) dummy result)
+      ;; follow list of dictionaries
+      (if (= result 65535)
+	  -1				; failure
+	(while (< i result)
+	  (comm-unpack (s) dic)
+	  (if dl
+	      (setq dl (setcdr dl (cons dic nil)))
+	    (setq dic-list (setq dl (cons dic nil))))
+	  (setq i (1+ i)))
+	dic-list))))
 
 (defun cannarpc-open-dictionary (env dict-file-name mode)
-  (cannarpc-call-with-environment env (dymmy result)
+  (cannarpc-call-with-environment env (dummy result)
     (comm-format (b b w u w s) (canna-const MountDictionary) 0
 		 (+ (length dict-file-name) 7)
 		 mode context dict-file-name)
@@ -128,27 +189,28 @@
     result))
 
 (defun cannarpc-close-dictionary (env dict-file-name mode)
-  (cannarpc-call-with-environment env (dymmy result)
+  (cannarpc-call-with-environment env (dummy result)
     (comm-format (b b w u w s) (canna-const UnmountDictionary) 0
-		 (+ (length dict-file-name) 6)
+		 (+ (length dict-file-name) 7)
 		 mode context dict-file-name)
     (comm-unpack (u b) dummy result)
     result))
 
 (defun cannarpc-begin-conversion (env yomi)
   "Begin conversion."
-  (let ((yomi-ext (encode-coding-string yomi 'euc-japan))
+  (let ((yomi-ext (encode-coding-string yomi 'fixed-euc-jp))
+	(mode (or (cannaenv-get-mode env) 19)) ; 19 kana hiragana
 	(i 0)
 	converted bunsetsu-list bl)
     (cannarpc-call-with-environment env (dummy result)
-      (comm-format (b b w u w S) (canna-const BeginConvert) 0
-		   (+ (length yomi-ext) 8) 0 context yomi)
+      (comm-format (b b w i w S) (canna-const BeginConvert) 0
+		   (+ (length yomi-ext) 8) mode context yomi)
       (comm-unpack (u w) dummy result)
       (if (= result 65535)
 	  -1				; failure
 	(while (< i result)
 	  (comm-unpack (S) converted)
-	  (let ((bl1 (cons (canna-make-bunsetsu env converted i)
+	  (let ((bl1 (cons (canna-make-bunsetsu env converted i nil)
 			   nil)))
 	    (if bl
 		(setq bl (setcdr bl bl1))
@@ -156,11 +218,21 @@
 	  (setq i (1+ i)))
 	bunsetsu-list))))
 
+(defun cannarpc-cancel-conversion (env)
+  "Cancel conversion."
+  (cannarpc-call-with-environment env (dummy result)
+    (comm-format (b b w w w u) (canna-const EndConvert) 0 8 context 0 0)
+    (comm-unpack (u b) dummy result)
+    (if (= result 255)
+	-1				; failure
+      result)))
+
 (defun cannarpc-end-conversion (env len zenkouho-pos-vector mode)
   "End conversion."
   (cannarpc-call-with-environment env (dummy result)
     (comm-format (b b w w w u v) (canna-const EndConvert) 0
-		 (+ (* len 2) 8) context len mode zenkouho-pos-vector)
+		 (+ (* len 2) 8) context len mode zenkouho-pos-vector
+		 (length zenkouho-pos-vector))
     (comm-unpack (u b) dummy result)
     (if (= result 255)
 	-1				; failure
@@ -173,6 +245,24 @@
     (comm-unpack (u b) dummy result)
     result))
 
+(defun cannarpc-save-dictionary (env dict-name)
+  (cannarpc-call-with-environment env (dummy result)
+    (comm-format (b b w u w s) (canna-const Sync) 1
+		 (+ (length dict-name) 7) 0 context dict-name)
+    (comm-unpack (u b) dummy result)
+    result))
+
+;;; XXX not used
+(defun cannarpc-get-dictionary-data (env dir dic)
+  (cannarpc-call-with-environment env (dummy result)
+    (comm-format (b b w w s s w) 6 1
+		 (+ (length dir) (length dic) 6) context dir dic 4096)
+    (comm-unpack (u w) dummy result)
+    (if (= result 65535)
+	-1
+;;      (comm-unpack (S) result)
+      result)))
+
 (defun cannarpc-get-bunsetsu-source (env bunsetsu-pos)
   (cannarpc-call-with-environment env (dummy result)
     (comm-format (b b w w w w) (canna-const GetYomi) 0 6 context
@@ -183,23 +273,123 @@
       (comm-unpack (S) result)
       result)))
 
-(defun cannarpc-get-bunsetsu-candidates (env bunsetsu-pos)
+(defun cannarpc-get-bunsetsu-candidates (env bunsetsu-pos yomi)
   (let ((i 0)
 	converted bunsetsu-list bl)
     (cannarpc-call-with-environment env (dummy result)
       (comm-format (b b w w w w) (canna-const GetCandidacyList) 0 6 context
 		   bunsetsu-pos 1024)
-      (comm-unpack (u w) dymmy result)
+      (comm-unpack (u w) dummy result)
       (if (= result 65535)
 	  -1				; failure
 	(while (< i result)
 	  (comm-unpack (S) converted)
-	  (let ((bl1 (cons (canna-make-bunsetsu env converted bunsetsu-pos)
+	  (let ((bl1 (cons (canna-make-bunsetsu env converted
+						bunsetsu-pos yomi)
 			   nil)))
 	    (if bl
 		(setq bl (setcdr bl bl1))
 	      (setq bunsetsu-list (setq bl bl1))))
 	  (setq i (1+ i)))
 	bunsetsu-list))))
+
+(defun cannarpc-set-kugiri-changed (env yomi-length bunsetsu-pos)
+  ;; yomi-length -2$B!DJ8@a=L$a(B -1$B!DJ8@a?-$P$7(B
+  (let* ((i bunsetsu-pos)
+	 converted bunsetsu-list bl)
+    (cannarpc-call-with-environment env (dummy result)
+      (comm-format (b b w w w w) (canna-const ResizePause) 0 6 context
+		   bunsetsu-pos yomi-length)
+      (comm-unpack (u w) dummy result)
+      (if (= result 65535)
+	  -1				; failure
+	(while (< i result)
+	  (comm-unpack (S) converted)
+	  (let ((bl1 (cons (canna-make-bunsetsu env converted i nil) nil)))
+	    (if bl
+		(setq bl (setcdr bl bl1))
+	      (setq bunsetsu-list (setq bl bl1))))
+	  (setq i (1+ i)))
+	bunsetsu-list))))
+
+(defun cannarpc-get-hinshi (env bunsetsu-pos kouho-pos)
+  (let (b hinshi)
+    (cannarpc-call-with-environment env (dummy result)
+      (comm-format (b b w w w w w) (canna-const GetHinshi) 0 8 context
+		   bunsetsu-pos kouho-pos 1024)
+      (comm-unpack (u w) dummy result)
+      (if (= result 65535)
+	  -1
+	(while (> result 0)
+	  (comm-unpack (w) b)
+	  (setq hinshi (concat hinshi (char-to-string b)))
+	  (setq result (1- result)))
+	hinshi))))
+
+(defun cannarpc-get-lex (env bunsetsu-pos kouho-pos)
+  (let ((i 0)
+	ylen klen rownum coldnum dicnum lex-list ll)
+    (cannarpc-call-with-environment env (dummy result)
+      (comm-format (b b w w w w w) (canna-const GetLex) 0 8 context
+		   bunsetsu-pos kouho-pos 1024)
+      (comm-unpack (u w) dummy result)
+      (if (= result 65535)
+	  -1
+	(while (< i result)
+	  (comm-unpack (i i i i i) ylen klen rownum coldnum dicnum)
+	  (let ((ll1 (cons (list ylen klen rownum coldnum dicnum) nil)))
+	    (if ll
+		(setq ll (setcdr ll ll1))
+	      (setq lex-list (setq ll ll1))))
+	  (setq i (1+ i)))
+	lex-list))))
+
+(defun cannarpc-add-word (env dictionary yomi kanji hinshi)
+  "Register a word KANJI into DICTIONARY with a pronunciation YOMI and
+a part of speech HINSHI.  Where DICTIONARY should be an integer."
+  (let* ((word-info (concat yomi " " hinshi " " kanji))
+	 (word-info-ext (encode-coding-string word-info 'fixed-euc-jp))
+	 (length (+ (length word-info-ext) (length dictionary) 5)))
+    (cannarpc-call-with-environment env (dummy result)
+      (comm-format (b b w w S s) (canna-const DefineWord) 0 length context
+		   word-info dictionary)
+      (comm-unpack (u b) dummy result)
+      (if (= result 255)
+	  -1		; failure
+	result))))
+
+(defun cannarpc-delete-word (env dictionary yomi kanji hinshi)
+  "Delete the registered word KANJI from DICTIONARY with a
+pronunciation YOMI and a part of speech HINSHI.  Where DICTIONARY
+should be an integer."
+  (let* ((word-info (concat yomi " " hinshi " " kanji))
+	 (word-info-ext (encode-coding-string word-info 'fixed-euc-jp))
+	 (length (+ (length word-info-ext) (length dictionary) 5)))
+    (cannarpc-call-with-environment env (dummy result)
+      (comm-format (b b w w S s) (canna-const DeleteWord) 0 length context
+		   word-info dictionary)
+      (comm-unpack (u b) dummy result)
+      (if (= result 255)
+	  -1		; failure
+	result))))
+
+(defun cannarpc-notice-group-name (proc context group)
+  (comm-call-with-proc proc (dummy result)
+    (comm-format (b b w u w s) (canna-const NoticeGroupName) 0
+		 (+ (length group) 7) 0 ;; mode = 0
+		 context group)
+    (comm-unpack (u b) dummy result)
+    (if (= result 255)
+	-1
+      result)))
+
+(defun cannarpc-set-app-name (proc context name)
+  (comm-call-with-proc proc (dummy result)
+    (comm-format (b b w u w s) (canna-const SetApplicationName) 0
+		 (+ (length name) 7) 0 context name)
+    (comm-unpack (u b) dummy result)
+    (if (= result 255)
+	-1
+      result)))
 
 ;;; egg/cannarpc.el ends here.
Index: egg/sj3.el
===================================================================
RCS file: /cvs/tamago/tamago/egg/sj3.el,v
retrieving revision 1.1.1.3
retrieving revision 1.3
diff -d -u -p -r1.1.1.3 -r1.3
--- egg/sj3.el	27 Jan 2001 18:46:48 -0000	1.1.1.3
+++ egg/sj3.el	22 Jul 2002 13:18:56 -0000	1.3
@@ -35,33 +35,89 @@
 (require 'egg-edep)
 
 (defgroup sj3 nil
-  "SJ3 interface for Tamago 4"
+  "SJ3 interface for Tamago 4."
   :group 'egg)
 
-(defcustom  sj3-hostname "localhost"
-  "*Hostname of SJ3 server"
+(defcustom sj3-hostname "localhost"
+  "Hostname of SJ3 server"
   :group 'sj3 :type 'string)
 
-(defcustom  sj3-server-port 3086 
-  "*Port number of SJ3 server"
+(defcustom sj3-server-port 3086
+  "Port number of SJ3 server"
   :group 'sj3 :type 'integer)
 
-(defcustom sj3-server-version 2
-  "Major version number of SJ3 server."
-  :group 'sj3
-  :type '(choice (const 1) (const 2)))
-
-(defcustom sj3-server-coding-system-list '(shift_jis euc-japan)
-  "List of coding systems for SJ3 server v1 and v2."
-  :group 'sj3
-  :type '(list (symbol :tag "v1") (symbol :tag "v2")))
-
 
 (eval-when-compile
   (defmacro SJ3-const (c)
     (cond ((eq c 'FileNotExist) 35)
 	  )))
 
+(egg-add-message
+ '((Japanese
+    (sj3-register-1 "$BEPO?<-=qL>(B:")
+    (sj3-register-2 "$BIJ;lL>(B"))))
+
+(defvar sj3-hinshi-menu
+  '(("$BL>;l(B"	.
+     (menu "$BIJ;l(B:$BL>;l(B:"
+	   (("$BL>;l(B"		. 1)
+	    ("$BL>;l(B($B$*!D(B)"	. 2)
+	    ("$BL>;l(B($B$4!D(B)"	. 3)
+	    ("$BL>;l(B($B!DE*(B/$B2=(B)"	. 4)
+	    ("$BL>;l(B($B$*!D$9$k(B)"	. 5)
+	    ("$BL>;l(B($B!D$9$k(B)"	. 6)
+	    ("$BL>;l(B($B$4!D$9$k(B)"	. 7)
+	    ("$BL>;l(B($B!D$J(B/$B$K(B)"	. 8)
+	    ("$BL>;l(B($B$*!D$J(B/$B$K(B)"	. 9)
+	    ("$BL>;l(B($B$4!D$J(B/$B$K(B)"	. 10)
+	    ("$BL>;l(B($BI{;l(B)"	. 11))))
+    ("$BBeL>;l(B"	. 12)
+    ("$BID;z(B"	. 21)
+    ("$BL>A0(B"	. 22)
+    ("$BCOL>(B"	. 24)
+    ("$B8)(B/$B6hL>(B"	. 25)
+    ("$BF0;l(B"	.
+     (menu "$BIJ;l(B:$BF0;l(B:"
+	   (("$B%5JQ8l44(B"		. 80)
+	    ("$B%6JQ8l44(B"		. 81)
+	    ("$B0lCJITJQ2=It(B"	. 90)
+	    ("$B%+9T8^CJ8l44(B"	. 91)
+	    ("$B%,9T8^CJ8l44(B"	. 92)
+	    ("$B%59T8^CJ8l44(B"	. 93)
+	    ("$B%?9T8^CJ8l44(B"	. 94)
+	    ("$B%J9T8^CJ8l44(B"	. 95)
+	    ("$B%P9T8^CJ8l44(B"	. 96)
+	    ("$B%^9T8^CJ8l44(B"	. 97)
+	    ("$B%i9T8^CJ8l44(B"	. 98)
+	    ("$B%o9T8^CJ8l44(B"	. 99))))
+    ("$BO"BN;l(B"		. 26)
+    ("$B@\B3;l(B"		. 27)
+    ("$B=u?t;l(B"		. 29)
+    ("$B?t;l(B"		. 30)
+    ("$B@\F,8l(B"		. 31)
+    ("$B@\Hx8l(B"		. 36)
+    ("$BI{;l(B"		. 45)
+    ("$BI{;l(B2"		. 46)
+    ("$B7AMF;l8l44(B"	. 60)
+    ("$B7AMFF0;l8l44(B"	. 71)
+    ("$BC14A;z(B"		. 189))
+  "Menu data for a hinshi (a part of speech) selection.")
+
+(defun sj3-hinshi-name (id &optional menu alist)
+  "Return a hinshi (a part of speech) name corresponding to ID.
+If ID is nil, return a flattened alist from `sj3-hinshi-menu'.
+Don't specify the optional arguments in normal use."
+  (let ((menu (or menu sj3-hinshi-menu)))
+    (if (consp menu)
+	(if (consp (cdr menu))
+	    (mapcar (lambda (elem)
+		      (setq alist (sj3-hinshi-name nil elem alist)))
+		    menu)
+	  (setq alist (nconc alist (list (cons (cdr menu) (car menu)))))))
+    (if id
+	(cdr (assq id alist))
+      alist)))
+
 (setplist 'sj3-conversion-backend
 	  '(egg-start-conversion          sj3-start-conversion
 	    egg-get-bunsetsu-source       sj3-get-bunsetsu-source
@@ -71,7 +127,8 @@
 	    egg-list-candidates           sj3-list-candidates
 	    egg-decide-candidate          sj3-decide-candidate
 	    egg-change-bunsetsu-length    sj3-change-bunsetsu-length
-	    egg-end-conversion            sj3-end-conversion))
+	    egg-end-conversion            sj3-end-conversion
+	    egg-word-registration         sj3-word-registration))
 
 (defconst sj3-backend-alist '((Japanese ((sj3-conversion-backend)))))
 
@@ -90,7 +147,7 @@
       ((error quit)
        (egg-error "failed to connect sj3 server")))
     (process-kill-without-query proc)
-    (set-process-coding-system proc 'no-conversion 'no-conversion)
+    (set-process-coding-system proc 'binary 'binary)
     (set-marker-insertion-type (process-mark proc) t)
     (save-excursion
       (set-buffer buf)
@@ -141,7 +198,7 @@
 ;;       (if proc
 ;; 	  (progn
 ;; 	    (process-kill-without-query proc)
-;; 	    (set-process-coding-system proc 'no-conversion 'no-conversion)
+;; 	    (set-process-coding-system proc 'binary 'binary)
 ;; 	    (set-marker-insertion-type (process-mark proc) t)
 ;; 	    ;; Initialize dictionaries
 ;; 	    (setq sj3-sys-dict-list nil)
@@ -353,7 +410,7 @@ Return the list of bunsetsu."
     (list (list candidate))))
 
 (defun sj3-change-bunsetsu-length (bunsetsu prev-b next-b len major)
-  (let ((yomi (apply 'concat (mapcar 'sj3bunsetsu-get-source bunsetsu)))
+  (let ((yomi (mapconcat 'sj3bunsetsu-get-source bunsetsu nil))
 	(env (sj3bunsetsu-get-env (car bunsetsu)))
 	(old (car bunsetsu))
 	new yomi1 yomi2)
@@ -361,7 +418,7 @@ Return the list of bunsetsu."
 	  yomi2 (substring yomi len))
     (setq new (sj3rpc-tanbunsetsu-conversion env yomi1))
     ;; Only set once (memory original length of the bunsetsu).
-    (sj3bunsetsu-set-kugiri-changed new 
+    (sj3bunsetsu-set-kugiri-changed new
 				    (or (sj3bunsetsu-get-kugiri-changed old)
 					(length (sj3bunsetsu-get-source old))))
     (if (> (length yomi2) 0)
@@ -381,6 +438,37 @@ Return the list of bunsetsu."
 	(sj3rpc-close proc)
 	(setq sj3-environment nil))))
 
+;;; word registration
+
+(defun sj3-dictionary-select ()
+  (menudiag-select (list 'menu
+			 (egg-get-message 'sj3-register-1)
+			 (aref (nth 2 sj3-dictionary-specification) 0))))
+
+(defun sj3-hinshi-select ()
+  (menudiag-select (list 'menu
+			 (egg-get-message 'sj3-register-2)
+			 sj3-hinshi-menu)))
+
+(defun sj3-word-registration (backend kanji yomi)
+  "Register a word KANJI with a pronunciation YOMI."
+  (if (or (null (eq (egg-get-language 0 kanji)
+		    (sj3-get-converted-language backend)))
+	  (next-single-property-change 0 'egg-lang kanji)
+	  (null (eq (egg-get-language 0 yomi)
+		    (sj3-get-source-language backend)))
+	  (next-single-property-change 0 'egg-lang yomi))
+      (egg-error "word registration: invalid character")
+    (let* ((env (sj3-get-environment))
+	   (dic (sj3-dictionary-select))
+	   (hinshi-id (sj3-hinshi-select))
+	   (result (sj3rpc-add-word env
+				    (car (aref env 1))
+				    yomi kanji hinshi-id)))
+      (if (>= result 0)
+	  (list (sj3-hinshi-name hinshi-id) dic)
+	(egg-error (sj3rpc-get-error-message (- result)))))))
+
 ;;; setup
 
 (load "egg/sj3rpc")
@@ -388,7 +476,7 @@ Return the list of bunsetsu."
 
 ;;;###autoload
 (defun egg-activate-sj3 (&rest arg)
-  "Activate SJ3 backend of Tamagotchy."
+  "Activate SJ3 backend of Tamago 4."
   (apply 'egg-mode (append arg sj3-backend-alist)))
 
 ;;; egg/sj3.el ends here.
Index: egg/sj3rpc.el
===================================================================
RCS file: /cvs/tamago/tamago/egg/sj3rpc.el,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -d -u -p -r1.1.1.2 -r1.2
--- egg/sj3rpc.el	27 Jan 2001 18:46:48 -0000	1.1.1.2
+++ egg/sj3rpc.el	27 Jan 2001 18:53:13 -0000	1.2
@@ -31,9 +31,18 @@
 
 ;;; Code:
 
+(defvar sj3-server-version 2
+  "*Major version number of SJ3 server.")
+
+(defvar sj3-server-coding-system 'shift_jis
+  "*Coding system used when decoding and encoding of I/O operation with
+SJ3 server.  Valid coding systems are depend on the server spec.")
+
 (eval-when-compile
   (require 'egg-com)
-;;  (load-library "egg/sj3")
+  (defmacro sj3-sjis-p ()
+    '(eq 'coding-category-sjis (coding-system-category
+				sj3-server-coding-system)))
   (defmacro sj3-const (c)
     (cond ((eq c 'OPEN)            1)
 	  ((eq c 'CLOSE)           2)
@@ -44,20 +53,20 @@
 	  ((eq c 'STDYSIZE)       23)
 	  ((eq c 'LOCK)           31)
 	  ((eq c 'UNLOCK)         32)
-	  ((eq c 'BEGIN)   '(if (eq 1 sj3-server-version) 41 111))
-	  ((eq c 'TANCONV) '(if (eq 1 sj3-server-version) 51 112))
-	  ((eq c 'KOUHO)   '(if (eq 1 sj3-server-version) 54 115))
-	  ((eq c 'KOUHOSU) '(if (eq 1 sj3-server-version) 55 116))
+	  ((eq c 'BEGIN)   '(if (sj3-sjis-p) 41 111))
+	  ((eq c 'TANCONV) '(if (sj3-sjis-p) 51 112))
+	  ((eq c 'KOUHO)   '(if (sj3-sjis-p) 54 115))
+	  ((eq c 'KOUHOSU) '(if (sj3-sjis-p) 55 116))
 	  ((eq c 'STDY)           61)
-	  ((eq c 'CLSTDY)  '(if (eq 1 sj3-server-version) 62 117))
-	  ((eq c 'WREG)    '(if (eq 1 sj3-server-version) 71 118))
-	  ((eq c 'WDEL)    '(if (eq 1 sj3-server-version) 72 119))
+	  ((eq c 'CLSTDY)  '(if (sj3-sjis-p) 62 117))
+	  ((eq c 'WREG)    '(if (sj3-sjis-p) 71 118))
+	  ((eq c 'WDEL)    '(if (sj3-sjis-p) 72 119))
 	  ((eq c 'MKDIC)          81)
 	  ((eq c 'MKSTDY)         82)
 	  ((eq c 'MKDIR)          83)
 	  ((eq c 'ACCESS)         84)
-	  ((eq c 'WSCH)    '(if (eq 1 sj3-server-version) 91 120))
-	  ((eq c 'WNSCH)   '(if (eq 1 sj3-server-version) 92 121))
+	  ((eq c 'WSCH)    '(if (sj3-sjis-p) 91 120))
+	  ((eq c 'WNSCH)   '(if (sj3-sjis-p) 92 121))
 	  ((eq c 'VERSION)       103)
 	  (t (error "No such constant")))))
 
@@ -85,15 +94,12 @@
 	   (goto-char (prog1 (point) (accept-process-output proc))))
 	receive-exprs))))
 
-(defmacro sj3rpc-server-coding-system ()
-  '(nth (1- sj3-server-version) sj3-server-coding-system-list))
-
-(defmacro sj3rpc-unpack-mb-string (coding-system)
-  `(let ((start (point)))
+(defmacro sj3rpc-unpack-mb-string ()
+  '(let ((start (point)))
      (while (not (search-forward "\0" nil t))
        (comm-accept-process-output))
      (decode-coding-string (buffer-substring start (1- (point)))
-			   ,coding-system)))
+			   sj3-server-coding-system)))
 
 (defun sj3rpc-open (proc myhostname username)
   "Open the session.  Return 0 on success, error code on failure."
@@ -102,7 +108,7 @@
 		 myhostname username
 		 ;; program name
 		 (format "%d.emacs-egg" (emacs-pid)))
-    (comm-unpack (u) result)
+    (comm-unpack (i) result)
     (if (= result -2)
 	0
       result)))
@@ -110,7 +116,7 @@
 (defun sj3rpc-close (proc)
   (comm-call-with-proc proc (result)
     (comm-format (u) (sj3-const CLOSE))
-    (comm-unpack (u) result)
+    (comm-unpack (i) result)
     result))
 
 (defun sj3rpc-get-stdy-size (proc)
@@ -134,10 +140,9 @@
 
 (defun sj3rpc-begin (env yomi)
   "Begin conversion."
-  (let* ((codesys (sj3rpc-server-coding-system))
-	 (yomi-ext (encode-coding-string yomi codesys))
-	 (p 0)
-	 len source converted stdy bunsetsu-list bl)
+  (let ((yomi-ext (encode-coding-string yomi sj3-server-coding-system))
+	(p 0)
+	len source converted stdy bunsetsu-list bl)
     (sj3rpc-call-with-environment env (result)
       (comm-format (u s) (sj3-const BEGIN) yomi-ext)
       (comm-unpack (u) result)
@@ -148,9 +153,9 @@
 		 (comm-unpack (b) len)
 		 (> len 0))
 	  (setq stdy (sj3rpc-get-stdy proc))
-	  (setq converted (sj3rpc-unpack-mb-string codesys))
+	  (setq converted (sj3rpc-unpack-mb-string))
 	  (setq source (decode-coding-string (substring yomi-ext p (+ p len))
-					     codesys)
+					     sj3-server-coding-system)
 		p (+ p len))
 	  (let ((bl1 (cons (sj3-make-bunsetsu env
 					      source converted nil stdy) nil)))
@@ -171,7 +176,7 @@
 (defun sj3rpc-close-dictionary (proc dict-no)
   (comm-call-with-proc proc (result)
     (comm-format (u u) (sj3-const DICDEL) dict-no)
-    (comm-unpack (u) result)
+    (comm-unpack (i) result)
     result))
 
 (defun sj3rpc-make-dictionary (proc dict-name)
@@ -181,19 +186,19 @@
 		 2048  ; Length
 		 256   ; Number
 		 )
-    (comm-unpack (u) result)
+    (comm-unpack (i) result)
     result))
 
 (defun sj3rpc-open-stdy (proc stdy-name)
   (comm-call-with-proc proc (result)
     (comm-format (u s s) (sj3-const OPENSTDY) stdy-name "")
-    (comm-unpack (u) result)
+    (comm-unpack (i) result)
     result))
 
 (defun sj3rpc-close-stdy (proc)
   (comm-call-with-proc proc (result)
     (comm-format (u) (sj3-const CLOSESTDY))
-    (comm-unpack (u) result)
+    (comm-unpack (i) result)
     result))
 
 (defun sj3rpc-make-stdy (proc stdy-name)
@@ -203,18 +208,17 @@
 		 1     ; Step
 		 2048  ; Length
 		 )
-    (comm-unpack (u) result)
+    (comm-unpack (i) result)
     result))
 
 (defun sj3rpc-make-directory (proc name)
   (comm-call-with-proc proc (result)
     (comm-format (u s) (sj3-const MKDIR) name)
-    (comm-unpack (u) result)
+    (comm-unpack (i) result)
     result))
 
 (defun sj3rpc-get-bunsetsu-candidates-sub (proc env yomi yomi-ext len n)
-  (let ((codesys (sj3rpc-server-coding-system))
-	(i 0)
+  (let ((i 0)
 	stdy converted bunsetsu bl bunsetsu-list cylen rest)
     (comm-call-with-proc-1 proc (result)
       (comm-format (u u s) (sj3-const KOUHO) len yomi-ext)
@@ -224,9 +228,9 @@
 	(while (< i n)
 	  (comm-unpack (u) cylen)
 	  (setq stdy (sj3rpc-get-stdy proc))
-	  (setq converted (sj3rpc-unpack-mb-string codesys))
+	  (setq converted (sj3rpc-unpack-mb-string))
 	  (setq rest (decode-coding-string (substring yomi-ext cylen)
-					   codesys))
+					   sj3-server-coding-system))
 	  (setq bunsetsu (sj3-make-bunsetsu env yomi converted rest stdy))
 	  (if bl
 	      (setq bl (setcdr bl (cons bunsetsu nil)))
@@ -240,7 +244,7 @@
 	bunsetsu-list))))
 
 (defun sj3rpc-get-bunsetsu-candidates (env yomi)
-  (let* ((yomi-ext (encode-coding-string yomi (sj3rpc-server-coding-system)))
+  (let* ((yomi-ext (encode-coding-string yomi sj3-server-coding-system))
 	 (len (length yomi-ext)))
     (sj3rpc-call-with-environment env (result)
       (comm-format (u u s) (sj3-const KOUHOSU) len yomi-ext)
@@ -254,9 +258,8 @@
 					      yomi yomi-ext len result))))))
 
 (defun sj3rpc-tanbunsetsu-conversion (env yomi)
-  (let* ((codesys (sj3rpc-server-coding-system))
-	 (yomi-ext (encode-coding-string yomi codesys))
-	 (len (length yomi-ext)) cylen stdy converted rest)
+  (let* ((yomi-ext (encode-coding-string yomi sj3-server-coding-system))
+	(len (length yomi-ext)) cylen stdy converted rest)
     (sj3rpc-call-with-environment env (result)
       (comm-format (u u s) (sj3-const TANCONV) len yomi-ext)
       (comm-unpack (u) result)
@@ -264,28 +267,35 @@
 	  (- result)
 	(comm-unpack (u) cylen)
 	(setq stdy (sj3rpc-get-stdy proc))
-	(setq converted (sj3rpc-unpack-mb-string codesys))
-	(setq rest (decode-coding-string (substring yomi-ext cylen) codesys))
+	(setq converted (sj3rpc-unpack-mb-string))
+	(setq rest (decode-coding-string (substring yomi-ext cylen)
+					 sj3-server-coding-system))
 	(setq bunsetsu (sj3-make-bunsetsu env yomi converted rest stdy))))))
 
 (defun sj3rpc-bunsetsu-stdy (env stdy)
   (sj3rpc-call-with-environment env (result)
      (comm-format (u v) (sj3-const STDY) stdy (length stdy))
      (comm-unpack (u) result)
-      (if (/= result 0)
-	  (- result)
-	0)))
+     (- result)))
 
 (defun sj3rpc-kugiri-stdy (env yomi1 yomi2 stdy)
-  (let* ((codesys (sj3rpc-server-coding-system))
-	 (yomi1-ext (encode-coding-string yomi1 codesys))
-	 (yomi2-ext (encode-coding-string yomi2 codesys)))
-    (sj3rpc-call-with-environment env (result)
-      (comm-format (u s s v) (sj3-const CLSTDY)
-		   yomi1-ext yomi2-ext stdy (length stdy))
-      (comm-unpack (u) result)
-      (if (/= result 0)
-	  (- result)
-	0))))
+  (sj3rpc-call-with-environment env (result)
+    (comm-format (u s s v) (sj3-const CLSTDY)
+		 (encode-coding-string yomi1 sj3-server-coding-system)
+		 (encode-coding-string yomi2 sj3-server-coding-system)
+		 stdy (length stdy))
+    (comm-unpack (u) result)
+    (- result)))
+
+(defun sj3rpc-add-word (env dictionary yomi kanji hinshi)
+  "Register a word KANJI into DICTIONARY with a pronunciation YOMI and
+a part of speech HINSHI.  Where DICTIONARY should be an integer."
+  (sj3rpc-call-with-environment env ()
+    (comm-format (u u s s u) (sj3-const WREG) dictionary
+		 (encode-coding-string yomi sj3-server-coding-system)
+		 (encode-coding-string kanji sj3-server-coding-system)
+		 hinshi)
+    (comm-unpack (u) result)
+    (- result)))
 
 ;;; egg/sj3rpc.el ends here.
Index: egg/wnn.el
===================================================================
RCS file: /cvs/tamago/tamago/egg/wnn.el,v
retrieving revision 1.1.1.1
retrieving revision 1.4
diff -d -u -p -r1.1.1.1 -r1.4
--- egg/wnn.el	27 Jan 2001 18:45:24 -0000	1.1.1.1
+++ egg/wnn.el	22 Jul 2002 13:18:56 -0000	1.4
@@ -36,7 +36,7 @@
 (require 'egg-edep)
 
 (defgroup wnn nil
-  "Wnn interface for Tamagotchy"
+  "Wnn interface for Tamago 4."
   :group 'egg)
 
 (defcustom wnn-auto-save-dictionaries 0
@@ -114,6 +114,7 @@ by ':' and digit N."
      egg-major-bunsetsu-continue-p wnn-major-bunsetsu-continue-p
      egg-list-candidates           wnn-list-candidates
      egg-decide-candidate          wnn-decide-candidate
+     egg-special-candidate         wnn-special-candidate
      egg-change-bunsetsu-length    wnn-change-bunsetsu-length
      egg-bunsetsu-combinable-p     wnn-bunsetsu-combinable-p
      egg-end-conversion            wnn-end-conversion
@@ -389,13 +390,12 @@ by ':' and digit N."
 
 ;; <wnn-bunsetsu> ::= [ <env>
 ;;                      <jirilen> <dic-no> <entry> <freq> <right-now> <hinshi>
-;;                     	<status> <status-backward> <kangovect> <evaluation>
-;;                     	<converted> <yomi> <fuzokugo>
-;;                     	<dai-evaluation> <dai-continue> <change-top>
-;;                     	<zenkouho-info> <freq-down> <fi-rel> <context> ]
+;;                      <status> <status-backward> <kangovect> <evaluation>
+;;                      <converted> <yomi> <fuzokugo>
+;;                      <dai-evaluation> <dai-continue> <change-top>
+;;                      <zenkouho-info> <freq-down> <fi-rel> <context> ]
 ;;
 ;; <zenkouho-info> ::= [ <pos> <list> <converted> <dai> <prev-b> <nxet-b> ]
-;;                    
 
 (defsubst wnn-bunsetsu-create (env jirilen dic-no entry freq right-now hinshi
 			       status status-backward kangovect evaluation)
@@ -556,7 +556,7 @@ by ':' and digit N."
 				 (copy-sequence (egg-bunsetsu-get-info b))))
 	  bunsetsu))
 
-(defconst wnn-server-info-list
+(defvar wnn-server-info-list
   ;; language    server  port      hostname    proc   coding-system
   '((Japanese    jserver wnn-jport wnn-jserver "Wnn"  (fixed-euc-jp    fixed-euc-jp))
     (Chinese-GB  cserver wnn-cport wnn-cserver "cWnn" (fixed-euc-py-cn fixed-euc-zy-cn))
@@ -657,20 +657,28 @@ Return the list of bunsetsu."
 (defun wnn-major-bunsetsu-continue-p (bunsetsu)
   (wnn-bunsetsu-get-dai-continue bunsetsu))
 
+(defmacro wnn-uniq-hash-string (uniq-level)
+  `(mapconcat
+    (lambda (b)
+      (concat ,@(cond ((eq uniq-level 'wnn-uniq)
+		       '((number-to-string (wnn-bunsetsu-get-hinshi b))))
+		      ((eq uniq-level 'wnn-uniq-entry)
+		       '((number-to-string (wnn-bunsetsu-get-dic-no b))
+			 "+"
+			 (number-to-string (wnn-bunsetsu-get-entry b)))))
+	      "\0"
+	      (wnn-bunsetsu-get-converted b)
+	      "\0"
+	      (wnn-bunsetsu-get-fuzokugo b)))
+    bunsetsu "\0"))
+
 (defun wnn-uniq-hash (bunsetsu hash-table)
-  (intern (mapconcat (lambda (b)
-		       (concat (cond
-				((eq wnn-uniq-level 'wnn-uniq) 
-				 (wnn-bunsetsu-get-hinshi b))
-				((eq wnn-uniq-level 'wnn-uniq-entry)
-				 (concat (wnn-bunsetsu-get-dic-no b)
-					 "+"
-					 (wnn-bunsetsu-get-entry b))))
-			       (concat "\0"
-				       (wnn-bunsetsu-get-converted b)
-				       "\0"
-				       (wnn-bunsetsu-get-fuzokugo b))))
-		     bunsetsu "\0")
+  (intern (cond ((eq wnn-uniq-level 'wnn-uniq)
+		 (wnn-uniq-hash-string wnn-uniq))
+		((eq wnn-uniq-level 'wnn-uniq-entry)
+		 (wnn-uniq-hash-string wnn-uniq-entry))
+		(t
+		 (wnn-uniq-hash-string nil)))
 	  hash-table))
 
 (defun wnn-uniq-candidates (candidates)
@@ -786,6 +794,68 @@ Return the list of bunsetsu."
 	(setq next-b (list (car next-b))))
     (list cand prev-b next-b)))
 
+(defun wnn-special-candidate (bunsetsu prev-b next-b major type)
+  (let* ((backend (egg-bunsetsu-get-backend (car bunsetsu)))
+	 (lang (get backend 'language))
+	 pos cand)
+    (when (and (eq lang (get backend 'source-language))
+	       (eq lang (get backend 'converted-language)))
+      (setq pos (and (eq lang (get backend 'source-language))
+		     (eq lang (get backend 'converted-language))
+		     (cond ((eq lang 'Japanese)
+			    (cond ((eq type 'egg-hiragana) -1)
+				  ((eq type 'egg-katakana) -2)))
+			   ((or (eq lang 'Chinese-GB) (eq lang 'Chinese-CNS))
+			    (cond ((eq type 'egg-pinyin) -1)
+				  ((eq type 'egg-zhuyin) -1)))
+			   ((eq lang 'Korean)
+			    (cond ((eq type 'egg-hangul) -1))))))
+      (when pos
+	(setq cand (cdr (wnn-list-candidates bunsetsu prev-b next-b major))
+	      pos (+ pos (length cand)))
+	(when (and (or (eq lang 'Chinese-GB) (eq lang 'Chinese-CNS)))
+	  (let ((converted (nth pos cand)))
+	    (cond ((egg-pinyin-syllable converted)
+		   (cond ((eq type 'egg-pinyin)) ; OK
+			 ((eq type 'egg-zhuyin)
+			  (wnn-pinyin-zhuyin-bunsetsu bunsetsu pos lang type))
+			 (t (setq pos nil))))
+		  ((egg-zhuyin-syllable converted)
+		   (cond ((eq type 'egg-pinyin)
+			  (wnn-pinyin-zhuyin-bunsetsu bunsetsu pos lang type))
+			 ((eq type 'egg-zhuyin)) ; OK
+			 (t (setq pos nil))))
+		  (t (setq pos nil))))))
+      (when pos
+	(wnn-decide-candidate bunsetsu pos prev-b next-b)))))
+
+(defun wnn-pinyin-zhuyin-bunsetsu (bunsetsu pos lang type)
+  (let ((b (nth pos (wnn-bunsetsu-get-zenkouho-list (car bunsetsu))))
+	(encoding (if (eq lang 'Chinese-GB)
+		      (if (eq type 'egg-pinyin)
+			  'fixed-euc-py-cn 'fixed-euc-zy-cn)
+		    (if (eq type 'egg-pinyin)
+			'fixed-euc-py-tw 'fixed-euc-zy-tw)))
+	(converted (wnn-bunsetsu-get-zenkouho-converted (car bunsetsu)))
+	str)
+    (setcar (nthcdr pos converted)
+	    (wnn-pinyin-zhuyin-string (nth pos converted) encoding))
+    (while b
+      (setq str (wnn-bunsetsu-get-converted (car b)))
+      (when str
+	(wnn-bunsetsu-set-converted
+	 (car b)
+	 (wnn-pinyin-zhuyin-string str encoding)))
+      (setq str (wnn-bunsetsu-get-fuzokugo (car b)))
+      (when str
+	(wnn-bunsetsu-set-fuzokugo
+	 (car b)
+	 (wnn-pinyin-zhuyin-string str encoding)))
+      (setq b (cdr b)))))
+
+(defun wnn-pinyin-zhuyin-string (str encoding)
+  (decode-coding-string (encode-coding-string str encoding) encoding))
+
 (defun wnn-change-bunsetsu-length (bunsetsu prev-b next-b len major)
   (let ((backend (egg-bunsetsu-get-backend (car bunsetsu)))
 	(env (wnn-bunsetsu-get-env (car bunsetsu)))
@@ -918,7 +988,7 @@ Return the list of bunsetsu."
 					      (wnn-bunsetsu-get-right-now b)
 					      (wnn-bunsetsu-get-freq b))
 			  context))
-      (wnnrpc-set-frequency env dic-no entry 
+      (wnnrpc-set-frequency env dic-no entry
 			    (WNN-const IMA_ON) (WNN-const HINDO_INC)))
     (list (car context) (nth 1 context))))
 
@@ -1139,7 +1209,7 @@ Return the list of bunsetsu."
 	(proc-name (wnn-server-proc-name server-info))
 	(msg-form "Wnn: connecting to %S at %s...")
 	(user-name (user-login-name))
- 	buf hostname myname port-off proc result msg)
+	buf hostname myname port-off proc result msg)
     (unwind-protect
 	(progn
 	  (setq buf (generate-new-buffer (wnn-server-buffer-name server-info)))
@@ -1175,7 +1245,7 @@ Return the list of bunsetsu."
 		((error quit))))
 	    (when proc
 	      (process-kill-without-query proc)
-	      (set-process-coding-system proc 'no-conversion 'no-conversion)
+	      (set-process-coding-system proc 'binary 'binary)
 	      (set-process-sentinel proc 'wnn-comm-sentinel)
 	      (set-marker-insertion-type (process-mark proc) t)
 	      (setq result (wnnrpc-open proc myname user-name))
@@ -1276,7 +1346,7 @@ is non-NIL."
   (setq env-name (if reverse (concat env-name "R") env-name)
 	wnn-current-envspec (wnn-envspec-create env-name tankan stickey)
 	wnn-current-envspec-reverse reverse
-	wnn-envspec-list (nconc wnn-envspec-list 
+	wnn-envspec-list (nconc wnn-envspec-list
 				(list wnn-current-envspec))))
 
 (defun wnn-set-fuzokugo (filename)
@@ -1359,7 +1429,7 @@ is non-NIL."
 			       dict freq nil dict-rw freq-rw
 			       dict-passwd freq-passwd nil))
 
-(defun wnn-add-notrans-dict (dict priority dict-rw 
+(defun wnn-add-notrans-dict (dict priority dict-rw
 			     &optional dict-passwd &rest reverse)
   (wnn-wnn6-env-func wnn-add-notrans-dict)
   (wnn-add-dict-param-check wnn-add-notrans-dict
@@ -1705,7 +1775,7 @@ On failure, return negative error code."
 	     (wnn-create-frequency env fi did fname "" fpass))
 	(message (egg-get-message 'wnn-re-create-freq) fname)
 	(and (>= (setq fid (wnn-open-file env fname)) 0)
-	     (>= (wnnrpc-set-dictionary env 
+	     (>= (wnnrpc-set-dictionary env
 					did fid prior drw frw
 					dpass fpass rev)
 		 0))))))))
@@ -2090,7 +2160,7 @@ environment."
 
 ;;;###autoload
 (defun egg-activate-wnn (&rest arg)
-  "Activate Wnn backend of Tamagotchy."
+  "Activate Wnn backend of Tamago 4."
   (apply 'egg-mode (append arg wnn-backend-alist)))
 
 ;;; egg/wnn.el ends here.
Index: egg/wnnrpc.el
===================================================================
RCS file: /cvs/tamago/tamago/egg/wnnrpc.el,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -d -u -p -r1.1.1.1 -r1.3
--- egg/wnnrpc.el	27 Jan 2001 18:45:24 -0000	1.1.1.1
+++ egg/wnnrpc.el	22 Jul 2002 13:18:56 -0000	1.3
@@ -162,8 +162,8 @@
 	  ((eq c 'WNN_NOT_A_FILE)          98)
 	  ((eq c 'WNN_INODE_CHECK_ERROR)   99)
 
-	  ((eq c 'WNN_UD_DICT)        	    2)
-	  ((eq c 'WNN_REV_DICT)       	    3)
+	  ((eq c 'WNN_UD_DICT)              2)
+	  ((eq c 'WNN_REV_DICT)             3)
 	  ((eq c 'CWNN_REV_DICT)       ?\x103)
 	  ((eq c 'BWNN_REV_DICT)       ?\x203)
 	  ((eq c 'WNN_COMPACT_DICT)         5)
@@ -693,10 +693,10 @@
 
 (defmacro wnnrpc-get-result (&rest body)
   `(let (result)
-     (comm-unpack (u) result)
+     (comm-unpack (i) result)
      (if (< result 0)
        (progn
-	 (comm-unpack (u) result)
+	 (comm-unpack (i) result)
 	 (- result))
      ,@(or body '(result)))))
 
@@ -725,7 +725,7 @@
 
 (defun wnnrpc-connect (proc envname)
   "Establish new `connection' and make an environment.
-Return the identitifation of the environment on success, 
+Return the identitifation of the environment on success,
 or negative error code on failure."
   (comm-call-with-proc proc ()
     (comm-format (u s) (wnn-const JS_CONNECT) envname)
@@ -739,7 +739,7 @@ Return non-negative file ID on success, 
     (wnnrpc-get-result)))
 
 (defun wnnrpc-set-fuzokugo-file (env fid)
-  "For PROC, on environment ENV-ID, 
+  "For PROC, on environment ENV-ID,
 Set Fuzokugo file specified by FID.
 Return 0 on success, negate-encoded error code on failure."
   (wnnrpc-call-with-environment env ()
@@ -783,7 +783,7 @@ error code on faiulure."
     (comm-format (u u u) (wnn-const JS_GET_AUTOLEARNING_DIC)
 		 env-id type)
     (wnnrpc-get-result
-      (comm-unpack (u) result)
+      (comm-unpack (i) result)
       (1+ result))))
 
 (defun wnnrpc-set-autolearning-dic (env type dic-id)
@@ -798,16 +798,16 @@ Return 0 on success, negate-encoded erro
   "Return the version number of WNN server."
   (comm-call-with-proc proc (result)
     (comm-format (u) (wnn-const JS_VERSION))
-    (comm-unpack (u) result)
+    (comm-unpack (i) result)
     result))
 
-(defun wnnrpc-access (env path mode) 
+(defun wnnrpc-access (env path mode)
   "Check the accessibility of file in the environment ENV.
 Return 0 when the remote file (dictionary/frequency) of PATH on server
 can be accessed in mode MODE.  Return Non-zero otherwise."
   (wnnrpc-call-with-environment env (result)
     (comm-format (u u u s) (wnn-const JS_ACCESS) env-id mode path)
-    (comm-unpack (u) result)
+    (comm-unpack (i) result)
     result))
 
 (defun wnnrpc-mkdir (env path)
@@ -904,7 +904,7 @@ Return positive if loaded, zero if not, 
 	hinshi status status-backward kangovect evaluation
 	result source fuzokugo)
     (while (> n-bunsetsu 0)
-      (comm-unpack (u u u u u u u u u u u u)
+      (comm-unpack (i i i i i i i i i i i i)
 		   end start jiritsugo-end
 		   dic-no entry freq right-now hinshi
 		   status status-backward kangovect evaluation)
@@ -929,9 +929,9 @@ Return positive if loaded, zero if not, 
 	n-bunstsu kanji-length dlist slist
 	end start n-sho evaluation
 	n retval)
-    (comm-unpack (u u) n-bunstsu kanji-length)
+    (comm-unpack (i i) n-bunstsu kanji-length)
     (while (> n-dai 0)
-      (comm-unpack (u u u u) end start n-sho evaluation)
+      (comm-unpack (i i i i) end start n-sho evaluation)
       (setq dlist (cons (cons n-sho evaluation) dlist)
 	    n-dai (1- n-dai)))
     (setq dlist (nreverse dlist)
@@ -1010,7 +1010,7 @@ HINSHI and FUZOKUGO are information of p
 	fi-dic dic entry offset num result)
     (comm-unpack (i) num)
     (while (> num 0)
-      (comm-unpack (u u u u) fi-dic dic entry offset)
+      (comm-unpack (i i i i) fi-dic dic entry offset)
       (setq result (cons (vector fi-dic dic entry offset -2 -4) result)
 	    num (1- num)))
     (nreverse result)))
@@ -1110,7 +1110,7 @@ HINSHI and FUZOKUGO are information of p
   ""
   (comm-call-with-proc proc (result)
     (comm-format (u s) (wnn-const JS_ENV_EXIST) envname)
-    (comm-unpack (u) result)
+    (comm-unpack (i) result)
     result))
 
 (defun wnnrpc-make-env-sticky (env)
@@ -1156,14 +1156,14 @@ HINSHI and FUZOKUGO are information of p
   ""
   (wnnrpc-call-with-environment env (n-dic)
     (comm-format (u u) (wnn-const JS_DIC_LIST) env-id)
-    (comm-unpack (u) n-dic)
+    (comm-unpack (i) n-dic)
     (wnnrpc-receive-dictionary-list proc n-dic)))
 
 (defun wnnrpc-get-fi-dictionary-list-with-environment (env mask)
   ""
   (wnnrpc-call-with-environment env (n-dic)
     (comm-format (u u u) (wnn-const JS_FI_DIC_LIST) env-id mask)
-    (comm-unpack (u) n-dic)
+    (comm-unpack (i) n-dic)
     (wnnrpc-receive-dictionary-list proc n-dic)))
 
 (defun wnnrpc-receive-dictionary-list (proc n-dic)
@@ -1171,7 +1171,7 @@ HINSHI and FUZOKUGO are information of p
 	rev comment dicname freqname dic-passwd freq-passwd
 	type gosuu dic-local-flag freq-local-flag retval)
     (while (> n-dic 0)
-      (comm-unpack (u u u u u u u u S s s s s u u u u)
+      (comm-unpack (i i i i i i i i S s s s s i i i i)
 		   entry dic freq dic-mode freq-mode enable-flag nice
 		   rev comment dicname freqname dic-passwd freq-passwd
 		   type gosuu dic-local-flag freq-local-flag)
@@ -1193,7 +1193,7 @@ HINSHI and FUZOKUGO are information of p
     (comm-format (u u i) (wnn-const JS_HINSI_DICTS) env-id -1)
     (wnnrpc-get-result
       (while (> result 0)
-	(comm-unpack (u) dic)
+	(comm-unpack (i) dic)
 	(setq dic-list (nconc dic-list (list dic))
 	      result (1- result)))
       dic-list)))
@@ -1222,7 +1222,7 @@ HINSHI and FUZOKUGO are information of p
 				     p10 p11 p12 p13 p14 p15)
     (comm-format (u u) (wnn-const JS_PARAM_GET) env-id)
     (wnnrpc-get-result
-      (comm-unpack (u u  u u u u u  u u u u u  u u u u u)
+      (comm-unpack (i i  i i i i i  i i i i i  i i i i i)
 		   n nsho p1 p2 p3 p4 p5 p6 p7 p8 p9
 		   p10 p11 p12 p13 p14 p15)
       (vector n nsho p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15))))
@@ -1243,7 +1243,7 @@ HINSHI and FUZOKUGO are information of p
   ""
   (comm-call-with-proc proc (result)
     (comm-format (u s) (wnn-const JS_FILE_LOADED) path)
-    (comm-unpack (u) result)
+    (comm-unpack (i) result)
     result))
 
 (defun wnnrpc-write-file (env fid filename)
@@ -1261,9 +1261,9 @@ HINSHI and FUZOKUGO are information of p
   (let ((i 0)
 	flist
 	nfiles fid local ref-count type name)
-    (comm-unpack (u) nfiles)
+    (comm-unpack (i) nfiles)
     (while (> nfiles 0)
-      (comm-unpack (u u u u s) fid local ref-count type name)
+      (comm-unpack (i i i i s) fid local ref-count type name)
       (setq flist (nconc flist (list (vector fid local ref-count type name)))
 	    nfiles (1- nfiles)))
     flist))
@@ -1284,7 +1284,7 @@ HINSHI and FUZOKUGO are information of p
   "3: dictionary, 4: hindo file, 5: fuzokugo-file"
   (wnnrpc-call-with-environment env (result)
     (comm-format (u u s) (wnn-const JS_FILE_STAT) env-id path)
-    (comm-unpack (u) result)
+    (comm-unpack (i) result)
     result))
 
 (defun wnnrpc-get-file-info (env fid)
@@ -1292,7 +1292,7 @@ HINSHI and FUZOKUGO are information of p
   (wnnrpc-call-with-environment env (name local ref-count type)
     (comm-format (u u u) (wnn-const JS_FILE_INFO) env-id fid)
     (wnnrpc-get-result
-      (comm-unpack (s u u u) name local ref-count type)
+      (comm-unpack (s i i i) name local ref-count type)
       (vector name local ref-count type))))
 
 (defmacro wnnrpc-receive-vector (n)
@@ -1300,7 +1300,7 @@ HINSHI and FUZOKUGO are information of p
 	 (i 0)
 	 j)
      (while (< i ,n)
-       (comm-unpack (u) j)
+       (comm-unpack (i) j)
        (aset v i j)
        (setq i (1+ i)))
      v))
@@ -1311,7 +1311,7 @@ HINSHI and FUZOKUGO are information of p
     (comm-format (u) (wnn-const JS_WHO))
     (wnnrpc-get-result
       (while (> result 0)
-	(comm-unpack (u s s) socket username hostname)
+	(comm-unpack (i s s) socket username hostname)
 	(setq who (nconc who
 			 (list (vector socket username hostname
 				       (wnnrpc-receive-vector
@@ -1324,7 +1324,7 @@ HINSHI and FUZOKUGO are information of p
     (comm-format (u) (wnn-const JS_ENV_LIST))
     (wnnrpc-get-result
       (while (> result 0)
-	(comm-unpack (u s u u u) id name count fuzokugo dic-max)
+	(comm-unpack (i s i i i) id name count fuzokugo dic-max)
 	(setq envs (nconc envs
 			  (list (vector id name count fuzokugo dic-max
 					(wnnrpc-receive-vector
@@ -1338,7 +1338,7 @@ HINSHI and FUZOKUGO are information of p
   ""
   (comm-call-with-proc proc (result)
     (comm-format (u) (wnn-const JS_KILL))
-    (comm-unpack (u) result)
+    (comm-unpack (i) result)
     result))
 
 (defun wnnrpc-delete-dictionary (env dic)
@@ -1357,7 +1357,7 @@ HINSHI and FUZOKUGO are information of p
   ""
   (wnnrpc-call-with-proc proc (n-dic)
     (comm-format (u) (wnn-const JS_DIC_LIST_ALL))
-    (comm-unpack (u) n-dic)
+    (comm-unpack (i) n-dic)
     (wnnrpc-receive-dictionary-list proc n-dic)))
 
 (defun wnnrpc-delete-word (env dic entry)
@@ -1369,15 +1369,15 @@ HINSHI and FUZOKUGO are information of p
 (defun wnnrpc-receive-word (proc yomi)
   (let (dic serial hinshi hindo right-now internal-hindo internal-right-now
 	kanji comment l l1)
-    (comm-unpack (u) dic)
+    (comm-unpack (i) dic)
     (while (>= dic 0)
-      (comm-unpack (u u u u u u) serial hinshi hindo right-now
+      (comm-unpack (i i i i i i) serial hinshi hindo right-now
 		   internal-hindo internal-right-now)
       (setq l (cons (vector dic serial hinshi hindo right-now
 			    internal-hindo internal-right-now
 			    yomi nil nil)
 		    l))
-      (comm-unpack (u) dic))
+      (comm-unpack (i) dic))
     (setq l (nreverse l)
 	  l1 l)
     (while l1
@@ -1454,16 +1454,16 @@ HINSHI and FUZOKUGO are information of p
 
 (defmacro wnnrpc-with-temp-buffer (&rest body)
   `(with-temp-buffer
-     (let ((coding-system-for-read 'no-conversion)
-	   (coding-system-for-write 'no-conversion))
+     (let ((coding-system-for-read 'binary)
+	   (coding-system-for-write 'binary))
        (set-buffer-multibyte nil)
        ,@body)))
 
 (defmacro wnnrpc-with-write-file (filename error-handler &rest body)
   `(condition-case error
        (with-temp-file ,filename
-	 (let ((coding-system-for-read 'no-conversion)
-	       (coding-system-for-write 'no-conversion))
+	 (let ((coding-system-for-read 'binary)
+	       (coding-system-for-write 'binary))
 	   (set-buffer-multibyte nil)
 	   ,@body))
      (file-error ,error-handler)))
@@ -1492,7 +1492,7 @@ HINSHI and FUZOKUGO are information of p
 		    (wnn-const WNN_FILE_STRING)))
 	(progn
 	  (goto-char (1+ (wnn-const WNN_FILE_STRING_LEN)))
-	  (comm-unpack (u v v v)
+	  (comm-unpack (i v v v)
 		       type
 		       uniq1 (wnn-const WNN_UNIQ_LEN)
 		       uniq2 (wnn-const WNN_UNIQ_LEN)
@@ -1511,7 +1511,7 @@ HINSHI and FUZOKUGO are information of p
     (cond ((null header)
 	   (- (wnn-const WNN_NOT_A_FILE)))
 	  ((null (car header))
-	   (if (file-exists-p path) 
+	   (if (file-exists-p path)
 	       (- (wnn-const WNN_OPENF_ERR))
 	     (- (wnn-const WNN_NO_EXIST))))
 	  (t
@@ -1534,10 +1534,18 @@ HINSHI and FUZOKUGO are information of p
 
 (defun wnnrpc-make-uniq (attributes)
   (wnnrpc-with-temp-buffer
-    (comm-format (U i u V)
-		 (nth 6 attributes) (nth 11 attributes) (nth 10 attributes)
-		 wnn-system-name (wnn-const WNN_HOST_LEN))
-    (buffer-string)))
+    (let ((ctime (nth 6 attributes))
+	  (ino (nth 10 attributes))
+	  (devno (nth 11 attributes)))
+      (if (numberp devno)
+	  (comm-format (U i u V)
+		       ctime devno ino
+		       wnn-system-name (wnn-const WNN_HOST_LEN))
+	;; Emacs 21 returns returns negative devno as 16 bits uint pair
+	(comm-format (U U u V)
+		     ctime (list (car devno) (cdr devno)) ino
+		     wnn-system-name (wnn-const WNN_HOST_LEN)))
+      (buffer-string))))
 
 (defun wnnrpc-change-file-uniq (header path &optional new)
   (wnnrpc-with-write-file path
@@ -1558,27 +1566,28 @@ HINSHI and FUZOKUGO are information of p
 (defun wnnrpc-check-passwd (proc passwd header)
   (let ((env-id -1))
     (unwind-protect
-	(if (>= (setq env-id (wnnrpc-connect proc "")) 0)
-	    (wnnrpc-call-with-environment (wnnenv-create proc env-id)
-		(file-id)
-	      (comm-format (u u v) (wnn-const JS_FILE_SEND)
-			   env-id
-			   (nth 1 header) (wnn-const WNN_UNIQ_LEN))
-	      (comm-unpack (u) file-id)
-	      (if (>= file-id 0)
-		  (progn
-		    (wnnrpc-get-result)	; ignore result code
-		    (- (wnn-const WNN_FILE_IN_USE)))
-		(wnnrpc-get-result
-		  (comm-call-with-proc-1 proc ()
-		    (comm-format (s B)
-				 (concat wnn-system-name "!TEMPFILE")
-				 (wnnrpc-make-dummy-dictionary header))
-		    (wnnrpc-get-result
-		      (let ((egg-fixed-euc (list egg-fixed-euc egg-fixed-euc)))
-			(wnnrpc-set-dictionary (wnnenv-create proc env-id)
-					       result -1 1 t t
-					       passwd "" nil))))))))
+	(if (< (setq env-id (wnnrpc-connect proc "")) 0)
+	    -1
+	  (wnnrpc-call-with-environment (wnnenv-create proc env-id)
+	      (file-id)
+	    (comm-format (u u v) (wnn-const JS_FILE_SEND)
+			 env-id
+			 (nth 1 header) (wnn-const WNN_UNIQ_LEN))
+	    (comm-unpack (i) file-id)
+	    (if (>= file-id 0)
+		(progn
+		  (wnnrpc-get-result)	; ignore result code
+		  (- (wnn-const WNN_FILE_IN_USE)))
+	      (wnnrpc-get-result
+		(comm-call-with-proc-1 proc ()
+		  (comm-format (s B)
+			       (concat wnn-system-name "!TEMPFILE")
+			       (wnnrpc-make-dummy-dictionary header))
+		  (wnnrpc-get-result
+		    (let ((egg-fixed-euc (list egg-fixed-euc egg-fixed-euc)))
+		      (wnnrpc-set-dictionary (wnnenv-create proc env-id)
+					     result -1 1 t t
+					     passwd "" nil))))))))
       (if (>= env-id 0)
 	  (wnnrpc-disconnect (wnnenv-create proc env-id))))))
 
@@ -1603,7 +1612,7 @@ HINSHI and FUZOKUGO are information of p
       (comm-call-with-proc proc (result)
 	(comm-format (u v) (wnn-const JS_FILE_LOADED_LOCAL)
 		     (nth 1 header) (wnn-const WNN_UNIQ_LEN))
-	(comm-unpack (u) result)
+	(comm-unpack (i) result)
 	result))))
 
 (defun wnnrpc-file-receive (env fid local-filename)
@@ -1629,7 +1638,7 @@ HINSHI and FUZOKUGO are information of p
 		(wnnrpc-terminate-current-command WNN_FILE_WRITE_ERROR))
 	       (t
 		(wnnrpc-with-write-file local-filename
-		    (- (wnn-const WNN_FILE_WRITE_ERROR))	    
+		    (- (wnn-const WNN_FILE_WRITE_ERROR))
 		  (comm-call-with-proc proc ()
 		    (comm-format (u) (wnn-const WNN_ACK))
 		    (comm-unpack (B) contents))
@@ -1654,7 +1663,7 @@ HINSHI and FUZOKUGO are information of p
 	    (comm-format (u u v) (wnn-const JS_FILE_SEND)
 			 env-id
 			 (nth 1 header) (wnn-const WNN_UNIQ_LEN))
-	    (comm-unpack (u) file-id)
+	    (comm-unpack (i) file-id)
 	    (if (>= file-id 0)
 		(wnnrpc-get-result
 		  (wnnenv-set-client-file env filename)
@@ -1705,7 +1714,7 @@ HINSHI and FUZOKUGO are information of p
 					     comment passwd hpasswd))
       0
     (- (wnn-const WNN_FILE_CREATE_ERROR))))
-	  
+
 
 (defun wnnrpc-hindo-file-create-client (env fi dic-id freqname comment passwd)
   (if (and (null (file-exists-p freqname))
@@ -1718,9 +1727,9 @@ HINSHI and FUZOKUGO are information of p
 (defun wnnrpc-make-temp-name (env)
   (let ((n 0)
 	(temp-form "usr/temp"))
-    (while (= (wnnrpc-access env (concat temp-form n) 0) 0)
+    (while (= (wnnrpc-access env (concat temp-form (number-to-string n)) 0) 0)
       (setq n (1+ n)))
-    (concat temp-form n)))
+    (concat temp-form (number-to-string n))))
 
 (defun wnnrpc-create-and-move-to-client (env dic-id filename type
 					     comment passwd hpasswd)
@@ -1750,7 +1759,7 @@ HINSHI and FUZOKUGO are information of p
   (cond
    ((null filename) "")
    ((null (file-readable-p filename)) (- (wnn-const WNN_FILE_READ_ERROR)))
-   (t 
+   (t
     (wnnrpc-with-temp-buffer
       (insert-file-contents filename nil 0 (1- (wnn-const WNN_PASSWD_LEN)))
       (goto-char 1)
@@ -1759,4 +1768,4 @@ HINSHI and FUZOKUGO are information of p
 	  (backward-char))
       (buffer-substring 1 (point))))))
 
-;;; egg/wnnrpc.el ends here.
+;;; egg/wnnrpc.el ends here
Index: its/ascii.el
===================================================================
RCS file: /cvs/tamago/tamago/its/ascii.el,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -d -u -p -r1.1.1.1 -r1.2
--- its/ascii.el	27 Jan 2001 18:45:24 -0000	1.1.1.1
+++ its/ascii.el	27 Jan 2001 18:53:13 -0000	1.2
@@ -26,10 +26,7 @@
 ;; Boston, MA 02111-1307, USA.
 
 ;;; Commentary:
-;;
-;; Symbol input is desined by jiro@math.keio.ac.jp (TANAKA Jiro)
-;; This file is based on the rules of its/hira.el in Mule-2.3 distribution.
-;;
+
 
 ;;; Code:
 
Index: its/aynu.el
===================================================================
RCS file: its/aynu.el
diff -N its/aynu.el
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ its/aynu.el	22 Jul 2002 13:18:56 -0000	1.3
@@ -0,0 +1,285 @@
+;;; its/aynu.el --- Aynu Katakana Input in Egg Input Method Architecture
+
+;; Copyright (C) 1999,2000 PFU LIMITED
+
+;; Author: KATAYAMA Yoshio <kate@pfu.co.jp>
+
+;; Maintainer: TOMURA Satoru <tomura@etl.go.jp>
+
+;; Keywords: mule, multilingual, input method
+
+;; This file is part of EGG.
+
+;; EGG is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; EGG is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+
+;;; Code:
+
+(eval-when-compile
+  (require 'its)
+  (require 'cl))
+
+(eval-when (compile)
+  (defconst its-compaction-enable t))
+
+(defvar its-aynu-enable-zenkaku-alphabet
+  (if (boundp 'its-enable-fullwidth-alphabet)
+      its-enable-fullwidth-alphabet
+    t)
+  "*Enable Zenkaku alphabet")
+
+(defvar its-aynu-horizontal      "$(O!<(B" "*-")	; "-" "$(O!=(B"
+(defvar	its-aynu-period          "$(O!#(B " "*.")	; "." "$(O!#(B"
+(defvar	its-aynu-comma           "$(O!$(B " "*,")	; "," "$(O!$(B"
+(defvar its-aynu-open-bracket    "$(O!V(B" "*[")	; "$(O!N(B"
+(defvar its-aynu-close-bracket   "$(O!W(B" "*]")	; "$(O!O(B"
+
+(defvar its-aynu-enable-double-n nil "*Enable \"nn\" input for \"$(O%s(B\"")
+
+(defvar its-aynu-kick-conversion-on-space nil "*Start conversion on SPACE")
+
+(eval-when-compile
+  (defun its-define-state-aynu (input i-tail output o-tail otherwise)
+    "Define following rules:
+INPUT + I-TAIL            --> OUTPUT + O-TAIL
+INPUT + I-TAIL + '        --> OUTPUT + O-TAIL
+INPUT + I-TAIL + vowel    --> (translate INPUT) + I-tail + vowel
+INPUT + I-TAIL + OTHERWISE  (see `its-defrule-otherwise')."
+    (let ((out (concat output o-tail))
+	  state)
+      (setq state (its-defrule (concat input i-tail) out))
+      (its-defrule (concat input i-tail "'") out)
+      (its-defrule-otherwise state nil "[aiueo]" -2)
+      (while otherwise
+	(its-defrule-otherwise state (concat output (caar otherwise))
+			       (nth 1 (car otherwise)) (nth 2 (car otherwise)))
+	(setq otherwise (cdr otherwise)))
+      (setq state (its-defrule (concat input i-tail "y") (concat out "$(O%#(B")))
+      (its-make-next-state state -1 out -1)
+      (its-defrule-otherwise state out nil -2)
+      (its-defrule-otherwise state nil "[u]" -3)
+))
+
+  (defconst its-aynu-tail-alist
+    (let ((common '(("k" "$(O&n(B" (("$(O%C(B" "[k]"  -1)))
+		    ("s" "$(O&o(B" (("$(O%C(B" "[s]"  -1) (nil "[h]" -2)))
+		    ("p" "$(O&x(B" (("$(O%C(B" "[p]"  -1)))
+		    ("m" "$(O&y(B" (("$(O%s(B" "[mp]" -1)))
+		    ("t" "$(O%C(B") ("y" "$(O%#(B") ("w" "$(O%%(B"))))
+      `((?a ("h" "$(O&s(B") ("x" "$(O&s(B") ("r" "$(O&z(B") ,@common)
+	(?i ("h" "$(O&t(B") ("x" "$(O&t(B") ("r" "$(O&{(B") ,@common)
+	(?u ("h" "$(O&u(B") ("x" "$(O&u(B") ("r" "$(O&|(B") ,@common)
+	(?e ("h" "$(O&v(B") ("x" "$(O&v(B") ("r" "$(O&}(B") ,@common)
+	(?o ("h" "$(O&w(B") ("x" "$(O&w(B") ("r" "$(O&~(B") ,@common))))
+
+  (defun its-defrule-aynu (conso vowel output)
+    (let ((input (concat conso vowel))
+	  (tails (and vowel (cdr (assq (aref vowel 0) its-aynu-tail-alist)))))
+      (its-defrule input output)
+      (while tails
+	(its-define-state-aynu input (caar tails) output (nth 1 (car tails))
+			       (nth 2 (car tails)))
+	(setq tails (cdr tails)))))
+
+  (defmacro its-define-aynu (&rest rules)
+    (let ((defs (list 'progn))
+	  conso vowels output)
+      (while rules
+	(setq vowels '(nil "a" "i" "u" "e" "o")
+	      conso  (caar rules)
+	      output (cdar rules)
+	      rules (cdr rules))
+	(while output
+	  (when (car output)
+	    (setq defs (cons `(its-defrule-aynu ,conso ,(car vowels)
+						,(car output))
+			     defs)))
+	  (setq output (cdr output)
+		vowels (cdr vowels))))
+      (nreverse defs)))
+
+  (defun its-defrule-aynu-override-yu (conso)
+    (let ((output (its-get-output (its-goto-state conso)))
+	  state)
+      (its-defrule (concat conso "yu")
+		   (concat (its-get-output (its-goto-state (concat conso "i")))
+			   "$(O%e!<(B"))
+      (setq state (its-goto-state (concat conso "y")))
+      (its-set-output state (concat output "$(O%#(B"))
+      (its-make-next-state state -1 output -1)
+      (its-defrule-otherwise state output nil -2))))
+
+(define-its-state-machine its-aynu-map
+  "roma-aynu-kata" "$(O%"(B" Aynu
+  "Map for Romaji-Aynu-Katakana translation. (Japanese)"
+
+  (defconst its-zenkaku-escape "Z")  ;; Escape character to Zenkaku inputs
+  (defconst its-hankaku-escape "~")  ;; Escape character to Hankaku inputs
+
+  (its-defrule-select-mode-temporally "q" downcase)
+  (its-defrule-select-mode-temporally "Q" zenkaku-downcase)
+
+  (dolist (small '(("a"  "$(O%!(B") ("i"  "$(O%#(B") ("u"  "$(O%%(B") ("e"  "$(O%'(B") ("o"  "$(O%)(B")
+		   ("ka" "$(O%u(B")             ("ku" "$(O&n(B") ("ke" "$(O%v(B")
+		               ("si" "$(O&o(B") ("su" "$(O&p(B")
+		                           ("tu" "$(O%C(B")             ("to" "$(O&q(B")
+		                           ("nu" "$(O&r(B")
+		   ("ha" "$(O&s(B") ("hi" "$(O&t(B") ("hu" "$(O&u(B") ("he" "$(O&v(B") ("ho" "$(O&w(B")
+		                           ("pu" "$(O&x(B")
+		                           ("mu" "$(O&y(B")
+		   ("ya" "$(O%c(B")             ("yu" "$(O%e(B")             ("yo" "$(O%g(B")
+		   ("ra" "$(O&z(B") ("ri" "$(O&{(B") ("ru" "$(O&|(B") ("re" "$(O&}(B") ("ro" "$(O&~(B")
+		   ("wa" "$(O%n(B")))
+    (its-defrule (concat "x" (car small)) (cadr small)))
+
+  (its-define-aynu
+   (""   nil	"$(O%"(B"   "$(O%$(B"   "$(O%&(B"   "$(O%((B"   "$(O%*(B")
+   ("k"  "$(O&n(B"		"$(O%+(B"   "$(O%-(B"   "$(O%/(B"   "$(O%1(B"   "$(O%3(B")
+   ("g"  "$(O%0(B"   "$(O%,(B"   "$(O%.(B"   "$(O%0(B"   "$(O%2(B"   "$(O%4(B")
+   ("s"  "$(O&p(B"		"$(O%5(B"   "$(O%7(B"   "$(O%9(B"   "$(O%;(B"   "$(O%=(B")
+   ("z"  nil    "$(O%6(B"   "$(O%8(B"   "$(O%:(B"   "$(O%<(B"   "$(O%>(B")
+   ("vs" nil    nil    nil    nil    "$(O%|(B"   nil)
+   ("sh" "$(O%7%c(B" "$(O%7%c(B" "$(O%7(B"   "$(O%7%e(B" "$(O%7%'(B" "$(O%7%g(B")
+   ("j"  nil    "$(O%8%c(B" "$(O%8(B"   "$(O%8%e(B" "$(O%8%'(B" "$(O%8%g(B")
+   ("t"  "$(O%C(B"   "$(O%?(B"   "$(O%A(B"   "$(O%H%%(B" "$(O%F(B"   "$(O%H(B")
+   ("vt" nil    nil    nil    "$(O%}(B"   nil    "$(O%~(B")
+   ("d"  nil    "$(O%@(B"   "$(O%B(B"   "$(O%E(B"   "$(O%G(B"   "$(O%I(B")
+   ("c"  "$(O%C(B"   "$(O%A%c(B" "$(O%A(B"   "$(O%A%e(B" "$(O%A%'(B" "$(O%A%g(B")
+   ("ch" "$(O%C(B"   "$(O%A%c(B" "$(O%A(B"   "$(O%A%e(B" "$(O%A%'(B" "$(O%A%g(B")
+   ("n"  "$(O%s(B"   "$(O%J(B"   "$(O%K(B"   "$(O%L(B"   "$(O%M(B"   "$(O%N(B")
+   ("h"  "$(O&s(B"   "$(O%O(B"   "$(O%R(B"   "$(O%U(B"   "$(O%X(B"   "$(O%[(B")
+   ("b"  nil    "$(O%P(B"   "$(O%S(B"   "$(O%V(B"   "$(O%Y(B"   "$(O%\(B")
+   ("p"  "$(O&x(B"   "$(O%Q(B"   "$(O%T(B"   "$(O%W(B"   "$(O%Z(B"   "$(O%](B")
+   ("m"  "$(O&y(B"   "$(O%^(B"   "$(O%_(B"   "$(O%`(B"   "$(O%a(B"   "$(O%b(B")
+   ("y"  "$(O%#(B"   "$(O%d(B"   "$(O%#(B"   "$(O%f(B"   "$(O%$%'(B" "$(O%h(B")
+   ("r"  "$(O&|(B"   "$(O%i(B"   "$(O%j(B"   "$(O%k(B"   "$(O%l(B"   "$(O%m(B")
+   ("w"  "$(O%%(B"   "$(O%o(B"   "$(O%&%#(B" "$(O%%(B"   "$(O%&%'(B" "$(O%&%)(B"))
+
+  (dolist (yu '("k" "g" "s" "z" "sh" "j" "t" "d"
+		"c" "ch" "n" "h" "b" "p" "m" "r"))
+    (its-defrule-aynu-override-yu yu))
+
+  (its-defrule "kk" "$(O%C(B" -1)
+  (its-defrule "ss" "$(O%C(B" -1)
+  (its-defrule "pp" "$(O%C(B" -1)
+  (its-defrule "vv" "$(O%C(B" -1)
+
+;; SYMBOL Input
+  (its-defrule   "z1"   "$(O!{(B")	(its-defrule   "z!"   "$(O!|(B")
+  (its-defrule   "z2"   "$(O"&(B")	(its-defrule   "z@"   "$(O"'(B")
+  (its-defrule   "z3"   "$(O"$(B")	(its-defrule   "z#"   "$(O"%(B")
+  (its-defrule   "z4"   "$(O""(B")	(its-defrule   "z$"   "$(O"#(B")
+  (its-defrule   "z5"   "$(O!~(B")	(its-defrule   "z%"   "$(O"!(B")
+  (its-defrule   "z6"   "$(O!y(B")	(its-defrule   "z^"   "$(O!z(B")
+  (its-defrule   "z7"   "$(O!}(B")	(its-defrule   "z&"   "$(O!r(B")
+  (its-defrule   "z8"   "$(O!q(B")	(its-defrule   "z*"   "$(O!_(B")
+  (its-defrule   "z9"   "$(O!i(B")	(its-defrule   "z("   "$(O!Z(B")
+  (its-defrule   "z0"   "$(O!j(B")	(its-defrule   "z)"   "$(O![(B")
+  (its-defrule   "z-"   "$(O!A(B")	(its-defrule   "z_"   "$(O!h(B")
+  (its-defrule   "z="   "$(O!b(B")	(its-defrule   "z+"   "$(O!^(B")
+  (its-defrule   "z\\"  "$(O!@(B")	(its-defrule   "z|"   "$(O!B(B")
+  (its-defrule   "z`"   "$(O!-(B")	(its-defrule   "z~"   "$(O!/(B")
+
+  (its-defrule   "zq"   "$(O!T(B")	(its-defrule   "zQ"   "$(O!R(B")
+  (its-defrule   "zw"   "$(O!U(B")	(its-defrule   "zW"   "$(O!S(B")
+					; e
+  (its-defrule   "zr"   "$(O!9(B")	(its-defrule   "zR"   "$(O!8(B")
+  (its-defrule   "zt"   "$(O!:(B")	(its-defrule   "zT"   "$(O!x(B")
+					; y u i o
+  (its-defrule   "zp"   "$(O")(B")	(its-defrule   "zP"   "$(O",(B")
+  (its-defrule   "z["   "$(O!X(B")	(its-defrule   "z{"   "$(O!L(B")
+  (its-defrule   "z]"   "$(O!Y(B")	(its-defrule   "z}"   "$(O!M(B")
+					; a
+  (its-defrule   "zs"   "$(O!3(B")	(its-defrule   "zS"   "$(O!4(B")
+  (its-defrule   "zd"   "$(O!5(B")	(its-defrule   "zD"   "$(O!6(B")
+  (its-defrule   "zf"   "$(O!7(B")	(its-defrule   "zF"   "$(O"*(B")
+  (its-defrule   "zg"   "$(O!>(B")	(its-defrule   "zG"   "$(O!=(B")
+  (its-defrule   "zh"   "$(O"+(B")
+  (its-defrule   "zj"   "$(O"-(B")
+  (its-defrule   "zk"   "$(O",(B")
+  (its-defrule   "zl"   "$(O"*(B")
+  (its-defrule   "z;"   "$(O!+(B")	(its-defrule   "z:"   "$(O!,(B")
+  (its-defrule   "z\'"  "$(O!F(B")	(its-defrule   "z\""  "$(O!H(B")
+					; z
+  (its-defrule   "zx"   ":-")	(its-defrule   "zX"   ":-)")
+  (its-defrule   "zc"   "$(O!;(B")	(its-defrule   "zC"   "$(O!n(B")
+  (its-defrule   "zv"   "$(O"((B")	(its-defrule   "zV"   "$(O!`(B")
+  (its-defrule   "zb"   "$(O!k(B")	(its-defrule   "zB"   "$(O"+(B")
+  (its-defrule   "zn"   "$(O!l(B")	(its-defrule   "zN"   "$(O"-(B")
+  (its-defrule   "zm"   "$(O!m(B")	(its-defrule   "zM"   "$(O".(B")
+  (its-defrule   "z,"   "$(O!E(B")	(its-defrule   "z<"   "$(O!e(B")
+  (its-defrule   "z."   "$(O!D(B")	(its-defrule   "z>"   "$(O!f(B")
+  (its-defrule   "z/"   "$(O!&(B")	(its-defrule   "z?"   "$(O!g(B")
+  )
+
+(define-its-state-machine-append its-aynu-map
+  (if its-aynu-enable-double-n
+      (its-defrule "nn" "$(O%s(B"))
+
+  (its-defrule "-" its-aynu-horizontal)
+  (its-defrule "." its-aynu-period)
+  (its-defrule "," its-aynu-comma)
+  (its-defrule "[" its-aynu-open-bracket)
+  (its-defrule "]" its-aynu-close-bracket)
+
+  (unless its-aynu-kick-conversion-on-space
+    (its-defrule " " " "))
+
+  (if its-aynu-enable-zenkaku-alphabet
+      (progn
+	(its-defrule   "1"   "$(O#1(B")  (its-defrule   "2"   "$(O#2(B")
+	(its-defrule   "3"   "$(O#3(B")  (its-defrule   "4"   "$(O#4(B")
+	(its-defrule   "5"   "$(O#5(B")  (its-defrule   "6"   "$(O#6(B")
+	(its-defrule   "7"   "$(O#7(B")  (its-defrule   "8"   "$(O#8(B")
+	(its-defrule   "9"   "$(O#9(B")  (its-defrule   "0"   "$(O#0(B")
+	(its-defrule   "!"   "$(O!*(B")  (its-defrule   "@"   "$(O!w(B")
+	(its-defrule   "#"   "$(O!t(B")  (its-defrule   "$"   "$(O!p(B")
+	(its-defrule   "%"   "$(O!s(B")  (its-defrule   "^"   "$(O!0(B")
+	(its-defrule   "&"   "$(O!u(B")  (its-defrule   "*"   "$(O!v(B")
+	(its-defrule   "("   "$(O!J(B")  (its-defrule   ")"   "$(O!K(B")
+	(its-defrule   "="   "$(O!a(B")  (its-defrule   "`"   "$(O!.(B")
+	(its-defrule   "\\"  "$(O!o(B")  (its-defrule   "|"   "$(O!C(B")
+	(its-defrule   "_"   "$(O!2(B")  (its-defrule   "+"   "$(O!\(B")
+	(its-defrule   "{"   "$(O!P(B")  (its-defrule   "}"   "$(O!Q(B")
+	(its-defrule   ":"   "$(O!'(B")  (its-defrule   ";"   "$(O!((B")
+	(its-defrule   "\""  "$(O!I(B")  (its-defrule   "'"   "$(O!G(B")
+	(its-defrule   "<"   "$(O!c(B")  (its-defrule   ">"   "$(O!d(B")
+	(its-defrule   "?"   "$(O!)(B")  (its-defrule   "/"   "$(O!?(B"))
+    (progn
+      (its-defrule   "1"   "1")  (its-defrule   "2"   "2")
+      (its-defrule   "3"   "3")  (its-defrule   "4"   "4")
+      (its-defrule   "5"   "5")  (its-defrule   "6"   "6")
+      (its-defrule   "7"   "7")  (its-defrule   "8"   "8")
+      (its-defrule   "9"   "9")  (its-defrule   "0"   "0")
+      (its-defrule   "!"   "!")  (its-defrule   "@"   "@")
+      (its-defrule   "#"   "#")  (its-defrule   "$"   "$")
+      (its-defrule   "%"   "%")  (its-defrule   "^"   "^")
+      (its-defrule   "&"   "&")  (its-defrule   "*"   "*")
+      (its-defrule   "("   "(")  (its-defrule   ")"   ")")
+      (its-defrule   "="   "=")  (its-defrule   "`"   "`")
+      (its-defrule   "\\"  "\\") (its-defrule   "|"   "|")
+      (its-defrule   "_"   "_")  (its-defrule   "+"   "+")
+      (its-defrule   "{"   "{")  (its-defrule   "}"   "}")
+      (its-defrule   ":"   ":")  (its-defrule   ";"   ";")
+      (its-defrule   "\""  "\"") (its-defrule   "'"   "'")
+      (its-defrule   "<"   "<")  (its-defrule   ">"   ">")
+      (its-defrule   "?"   "?")  (its-defrule   "/"   "/"))))
+
+(provide 'its/aynu)
+
+;;; its/aynu.el ends here
Index: its/greek.el
===================================================================
RCS file: its/greek.el
diff -N its/greek.el
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ its/greek.el	20 Aug 2001 10:09:07 -0000	1.1
@@ -0,0 +1,251 @@
+(eval-when-compile
+  (require 'its)
+  (require 'cl))
+
+(eval-when (compile)
+  (defconst its-compaction-enable t))
+
+(defgroup greek nil
+  "Greek Input Method"
+  :group 'its)
+
+(define-its-state-machine its-greek-jis-map
+ "greek-jis" "$B&8(B" Greek
+ "$B&%&K&K&G&M&I&J&A(B: Greek keyboard layout (JIS X0208.1983)
+
+The layout is same as greek, but uses JIS characters.
+Sorry, accents and terminal sigma are not supported in JIS."
+
+ (its-defrule "1"  "$B#1(B")
+ (its-defrule "2"  "$B#2(B")
+ (its-defrule "3"  "$B#3(B")
+ (its-defrule "4"  "$B#4(B")
+ (its-defrule "5"  "$B#5(B")
+ (its-defrule "6"  "$B#6(B")
+ (its-defrule "7"  "$B#7(B")
+ (its-defrule "8"  "$B#8(B")
+ (its-defrule "9"  "$B#9(B")
+ (its-defrule "0"  "$B#0(B")
+ (its-defrule "-"  "$B!](B")
+ (its-defrule "="  "$B!a(B")
+ (its-defrule "`"  "$B!F(B")
+ (its-defrule "q"  "$B!&(B")
+ (its-defrule "w"  "$B&R(B")
+ (its-defrule "e"  "$B&E(B")
+ (its-defrule "r"  "$B&Q(B")
+ (its-defrule "t"  "$B&S(B")
+ (its-defrule "y"  "$B&T(B")
+ (its-defrule "u"  "$B&H(B")
+ (its-defrule "i"  "$B&I(B")
+ (its-defrule "o"  "$B&O(B")
+ (its-defrule "p"  "$B&P(B")
+ (its-defrule "["  "$B!N(B")
+ (its-defrule "]"  "$B!O(B")
+ (its-defrule "a"  "$B&A(B")
+ (its-defrule "s"  "$B&R(B")
+ (its-defrule "d"  "$B&D(B")
+ (its-defrule "f"  "$B&U(B")
+ (its-defrule "g"  "$B&C(B")
+ (its-defrule "h"  "$B&G(B")
+ (its-defrule "j"  "$B&N(B")
+ (its-defrule "k"  "$B&J(B")
+ (its-defrule "l"  "$B&K(B")
+ (its-defrule ";"  "$B!G(B")
+ (its-defrule "'"  "$B!G(B")
+ (its-defrule "\\" "$B!@(B")
+ (its-defrule "z"  "$B&F(B")
+ (its-defrule "x"  "$B&V(B")
+ (its-defrule "c"  "$B&W(B")
+ (its-defrule "v"  "$B&X(B")
+ (its-defrule "b"  "$B&B(B")
+ (its-defrule "n"  "$B&M(B")
+ (its-defrule "m"  "$B&L(B")
+ (its-defrule ","  ", ")
+ (its-defrule "."  ". ")
+ (its-defrule "/"  "$B!?(B")
+  
+ (its-defrule "!"  "$B!*(B")
+ (its-defrule "@"  "$B!w(B")
+ (its-defrule "#"  "$B!t(B")
+ (its-defrule "$"  "$B!t(B")
+ (its-defrule "%"  "$B!s(B")
+ (its-defrule "^"  "$B!0(B")
+ (its-defrule "&"  "$B!u(B")
+ (its-defrule "*"  "$B!v(B")
+ (its-defrule "("  "$B!J(B")
+ (its-defrule ")"  "$B!K(B")
+ (its-defrule "_"  "$B!2(B")
+ (its-defrule "+"  "$B!\(B")
+ (its-defrule "~"  "$B!1(B")
+ (its-defrule "Q"  "$B!](B")
+ (its-defrule "W"  "$B&2(B")
+ (its-defrule "E"  "$B&%(B")
+ (its-defrule "R"  "$B&1(B")
+ (its-defrule "T"  "$B&3(B")
+ (its-defrule "Y"  "$B&4(B")
+ (its-defrule "U"  "$B&((B")
+ (its-defrule "I"  "$B&)(B")
+ (its-defrule "O"  "$B&/(B")
+ (its-defrule "P"  "$B&1(B")
+ (its-defrule "{"  "$B!P(B")
+ (its-defrule "}"  "$B!Q(B")
+ (its-defrule "A"  "$B&!(B")
+ (its-defrule "S"  "$B&2(B")
+ (its-defrule "D"  "$B&$(B")
+ (its-defrule "F"  "$B&5(B")
+ (its-defrule "G"  "$B&#(B")
+ (its-defrule "H"  "$B&'(B")
+ (its-defrule "J"  "$B&.(B")
+ (its-defrule "K"  "$B&*(B")
+ (its-defrule "L"  "$B&+(B")
+ (its-defrule ":"  "$B!I(B")
+ (its-defrule "\"" "$B!I(B")
+ (its-defrule "|"  "$B!C(B")
+ (its-defrule "Z"  "$B&&(B")
+ (its-defrule "X"  "$B&6(B")
+ (its-defrule "C"  "$B&7(B")
+ (its-defrule "V"  "$B&8(B")
+ (its-defrule "B"  "$B&"(B")
+ (its-defrule "N"  "$B&-(B")
+ (its-defrule "M"  "$B&,(B")
+ (its-defrule "<"  "$B!((B")
+ (its-defrule ">"  "$B!'(B")
+ (its-defrule "?"  "$B!)(B"))
+
+(define-its-state-machine its-greek-map
+ "greek" ",FY(B" Greek
+ ",FEkkgmij\(B: Greek keyboard layout (ISO 8859-7)
+--------------
+
+In the right of ,Fk(B key is a combination key, where
+ ,F4(B acute
+ ,F((B diaresis
+
+e.g.
+ ,Fa(B + ,F4(B -> ,F\(B
+ ,Fi(B + ,F((B -> ,Fz(B
+ ,Fi(B + ,F((B + ,F4(B -> ,F@(B"
+
+;; 1!  2@  3#  4$  5%  6^  7&  8*  9(  0)  -_  =+  `~
+;;  ,F7/(B  ,FrS(B  ,FeE(B  ,FqQ(B  ,FtT(B  ,FuU(B  ,FhH(B  ,FiI(B  ,FoO(B  ,FpP(B  [{  ]}
+;;   ,FaA(B  ,FsS(B  ,FdD(B  ,FvV(B  ,FcC(B  ,FgG(B  ,FnN(B  ,FjJ(B  ,FkK(B  ,F4((B  '"  \|
+;;    ,FfF(B  ,FwW(B  ,FxX(B  ,FyY(B  ,FbB(B  ,FmM(B  ,FlL(B  ,;  .:  /?  
+
+ (its-defrule "1"   "1")
+ (its-defrule "2"   "2")
+ (its-defrule "3"   "3")
+ (its-defrule "4"   "4")
+ (its-defrule "5"   "5")
+ (its-defrule "6"   "6")
+ (its-defrule "7"   "7")
+ (its-defrule "8"   "8")
+ (its-defrule "9"   "9")
+ (its-defrule "0"   "0")
+ (its-defrule "-"   "-")
+ (its-defrule "="   "=")
+ (its-defrule "`"   "`")
+ (its-defrule "q"   ",F7(B")
+ (its-defrule "w"   ",Fr(B")
+ (its-defrule "e"   ",Fe(B")
+ (its-defrule "r"   ",Fq(B")
+ (its-defrule "t"   ",Ft(B")
+ (its-defrule "y"   ",Fu(B")
+ (its-defrule "u"   ",Fh(B")
+ (its-defrule "i"   ",Fi(B")
+ (its-defrule "o"   ",Fo(B")
+ (its-defrule "p"   ",Fp(B")
+ (its-defrule "["   "[")
+ (its-defrule "]"   "]")
+ (its-defrule "a"   ",Fa(B")
+ (its-defrule "s"   ",Fs(B")
+ (its-defrule "d"   ",Fd(B")
+ (its-defrule "f"   ",Fv(B")
+ (its-defrule "g"   ",Fc(B")
+ (its-defrule "h"   ",Fg(B")
+ (its-defrule "j"   ",Fn(B")
+ (its-defrule "k"   ",Fj(B")
+ (its-defrule "l"   ",Fk(B")
+ (its-defrule ";"   ",F4(B")
+ (its-defrule "'"   "'")
+ (its-defrule "\\"  "\\")
+ (its-defrule "z"   ",Ff(B")
+ (its-defrule "x"   ",Fw(B")
+ (its-defrule "c"   ",Fx(B")
+ (its-defrule "v"   ",Fy(B")
+ (its-defrule "b"   ",Fb(B")
+ (its-defrule "n"   ",Fm(B")
+ (its-defrule "m"   ",Fl(B")
+ (its-defrule ","   ",")
+ (its-defrule "."   ".")
+ (its-defrule "/"   "/")
+ 
+ (its-defrule "!"   "!")
+ (its-defrule "@"   "@")
+ (its-defrule "#"   "#")
+ (its-defrule "$"   "$")
+ (its-defrule "%"   "%")
+ (its-defrule "^"   "^")
+ (its-defrule "&"   "&")
+ (its-defrule "*"   "*")
+ (its-defrule "("   "(")
+ (its-defrule ")"   ")")
+ (its-defrule "_"   "_")
+ (its-defrule "+"   "+")
+ (its-defrule "~"   "~")
+ (its-defrule "Q"   ",F/(B")
+ (its-defrule "W"   ",FS(B")
+ (its-defrule "E"   ",FE(B")
+ (its-defrule "R"   ",FQ(B")
+ (its-defrule "T"   ",FT(B")
+ (its-defrule "Y"   ",FU(B")
+ (its-defrule "U"   ",FH(B")
+ (its-defrule "I"   ",FI(B")
+ (its-defrule "O"   ",FO(B")
+ (its-defrule "P"   ",FP(B")
+ (its-defrule "{"   "{")
+ (its-defrule "}"   "}")
+ (its-defrule "A"   ",FA(B")
+ (its-defrule "S"   ",FS(B")
+ (its-defrule "D"   ",FD(B")
+ (its-defrule "F"   ",FV(B")
+ (its-defrule "G"   ",FC(B")
+ (its-defrule "H"   ",FG(B")
+ (its-defrule "J"   ",FN(B")
+ (its-defrule "K"   ",FJ(B")
+ (its-defrule "L"   ",FK(B")
+ (its-defrule ":"   ",F((B")
+ (its-defrule "\""  "\"")
+ (its-defrule "|"   "|")
+ (its-defrule "Z"   ",FF(B")
+ (its-defrule "X"   ",FW(B")
+ (its-defrule "C"   ",FX(B")
+ (its-defrule "V"   ",FY(B")
+ (its-defrule "B"   ",FB(B")
+ (its-defrule "N"   ",FM(B")
+ (its-defrule "M"   ",FL(B")
+ (its-defrule "<"   ";")
+ (its-defrule ">"   ":")
+ (its-defrule "?"   "?")
+ 
+ (its-defrule "a;"  ",F\(B")
+ (its-defrule "e;"  ",F](B")
+ (its-defrule "h;"  ",F^(B")
+ (its-defrule "i;"  ",F_(B")
+ (its-defrule "o;"  ",F|(B")
+ (its-defrule "y;"  ",F}(B")
+ (its-defrule "v;"  ",F~(B")
+ (its-defrule "A;"  ",F6(B")
+ (its-defrule "E;"  ",F8(B")
+ (its-defrule "H;"  ",F9(B")
+ (its-defrule "I;"  ",F:(B")
+ (its-defrule "O;"  ",F<(B")
+ (its-defrule "Y;"  ",F>(B")
+ (its-defrule "V;"  ",F?(B")
+ (its-defrule "i:"  ",Fz(B")
+ (its-defrule "y:"  ",F{(B")
+ (its-defrule "I:"  ",FZ(B")
+ (its-defrule "Y:"  ",F[(B")
+ (its-defrule "i:;" ",F@(B")
+ (its-defrule "y:;" ",F`(B"))
+
+(provide 'its/greek)
Index: its/hankata.el
===================================================================
RCS file: /cvs/tamago/tamago/its/hankata.el,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -d -u -p -r1.1.1.2 -r1.2
--- its/hankata.el	27 Jan 2001 18:45:56 -0000	1.1.1.2
+++ its/hankata.el	27 Jan 2001 18:53:13 -0000	1.2
@@ -24,10 +24,7 @@
 ;; Boston, MA 02111-1307, USA.
 
 ;;; Commentary:
-;;
-;; Symbol input is desined by jiro@math.keio.ac.jp (TANAKA Jiro)
-;; This file is based on the rules of its/kata.el in Mule-2.3 distribution.
-;;
+
 
 ;;; Code:
 
Index: its/jeonkak.el
===================================================================
RCS file: /cvs/tamago/tamago/its/jeonkak.el,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -d -u -p -r1.1.1.1 -r1.2
--- its/jeonkak.el	27 Jan 2001 18:45:24 -0000	1.1.1.1
+++ its/jeonkak.el	27 Jan 2001 18:53:13 -0000	1.2
@@ -26,10 +26,7 @@
 ;; Boston, MA 02111-1307, USA.
 
 ;;; Commentary:
-;;
-;; Symbol input is desined by jiro@math.keio.ac.jp (TANAKA Jiro)
-;; This file is based on the rules of its/hira.el in Mule-2.3 distribution.
-;;
+
 
 ;;; Code:
 
Index: its/pinyin.el
===================================================================
RCS file: /cvs/tamago/tamago/its/pinyin.el,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -d -u -p -r1.1.1.1 -r1.3
--- its/pinyin.el	27 Jan 2001 18:45:24 -0000	1.1.1.1
+++ its/pinyin.el	22 Jul 2002 13:18:56 -0000	1.3
@@ -4,7 +4,7 @@
 
 ;; Author: KATAYAMA Yoshio <kate@pfu.co.jp>
 
-;; Maintainer: TOMURA Satoru <tomura@etl.go.jp>
+;; Maintainer: TOMURA Satoru <tomura@etl.go.jp>
 
 ;; Keywords: mule, multilingual, input method
 
@@ -237,7 +237,7 @@
 
   (dolist (ascii '(("0" . "$A#0(B")  ("1" . "$A#1(B")  ("2" . "$A#2(B")  ("3" . "$A#3(B")
 		   ("4" . "$A#4(B")  ("5" . "$A#5(B")  ("6" . "$A#6(B")  ("7" . "$A#7(B")
-		   ("8" . "$A#8(B")  ("9" . "$A#9(B") 
+		   ("8" . "$A#8(B")  ("9" . "$A#9(B")
 		   (" " . "$A!!(B")  ("!" . "$A#!(B")  ("@" . "$A#@(B")  ("#" . "$A##(B")
 		   ("$" . "$A!g(B")  ("%" . "$A#%(B")  ("^" . "$A#^(B")  ("&" . "$A#&(B")
 		   ("*" . "$A#*(B")  ("(" . "$A#((B")  (")" . "$A#)(B")
@@ -311,7 +311,7 @@
 
   (dolist (ascii '(("0" . "$(G$!(B")  ("1" . "$(G$"(B")  ("2" . "$(G$#(B")  ("3" . "$(G$$(B")
 		   ("4" . "$(G$%(B")  ("5" . "$(G$&(B")  ("6" . "$(G$'(B")  ("7" . "$(G$((B")
-		   ("8" . "$(G$)(B")  ("9" . "$(G$*(B") 
+		   ("8" . "$(G$)(B")  ("9" . "$(G$*(B")
 		   (" " . "$(G!!(B")  ("!" . "$(G!*(B")  ("@" . "$(G"i(B")  ("#" . "$(G!l(B")
 		   ("$" . "$(G"c(B")  ("%" . "$(G"h(B")  ("^" . "$(G!T(B")  ("&" . "$(G!m(B")
 		   ("*" . "$(G!n(B")  ("(" . "$(G!>(B")  (")" . "$(G!?(B")
Index: its/quanjiao.el
===================================================================
RCS file: /cvs/tamago/tamago/its/quanjiao.el,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -d -u -p -r1.1.1.1 -r1.2
--- its/quanjiao.el	27 Jan 2001 18:45:24 -0000	1.1.1.1
+++ its/quanjiao.el	27 Jan 2001 18:53:13 -0000	1.2
@@ -26,10 +26,7 @@
 ;; Boston, MA 02111-1307, USA.
 
 ;;; Commentary:
-;;
-;; Symbol input is desined by jiro@math.keio.ac.jp (TANAKA Jiro)
-;; This file is based on the rules of its/hira.el in Mule-2.3 distribution.
-;;
+
 
 ;;; Code:
 
Index: its/thai.el
===================================================================
RCS file: /cvs/tamago/tamago/its/thai.el,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -d -u -p -r1.1.1.1 -r1.3
Index: its/zenkaku.el
===================================================================
RCS file: /cvs/tamago/tamago/its/zenkaku.el,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -d -u -p -r1.1.1.1 -r1.2
--- its/zenkaku.el	27 Jan 2001 18:45:24 -0000	1.1.1.1
+++ its/zenkaku.el	27 Jan 2001 18:53:13 -0000	1.2
@@ -26,10 +26,7 @@
 ;; Boston, MA 02111-1307, USA.
 
 ;;; Commentary:
-;;
-;; Symbol input is desined by jiro@math.keio.ac.jp (TANAKA Jiro)
-;; This file is based on the rules of its/hira.el in Mule-2.3 distribution.
-;;
+
 
 ;;; Code:
 
Index: its/zhuyin.el
===================================================================
RCS file: /cvs/tamago/tamago/its/zhuyin.el,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -d -u -p -r1.1.1.1 -r1.2
--- its/zhuyin.el	27 Jan 2001 18:45:24 -0000	1.1.1.1
+++ its/zhuyin.el	27 Jan 2001 18:53:13 -0000	1.2
@@ -142,9 +142,9 @@
        (mapcar (lambda (s) (its-defoutput (car s) (nth 1 s)))
 	       (list B P M F D T N L G K H J Q X))
 
-       (its-defrule (concat (car N) 2) (concat (nth 1 N) "(0B(B"))
-       (its-defrule (concat (car N) 3) (concat (nth 1 N) "(0C(B"))
-       (its-defrule (concat (car N) 4) (concat (nth 1 N) "(0D(B")))))
+       (its-defrule (concat (car N) "2") (concat (nth 1 N) "(0B(B"))
+       (its-defrule (concat (car N) "3") (concat (nth 1 N) "(0C(B"))
+       (its-defrule (concat (car N) "4") (concat (nth 1 N) "(0D(B")))))
 
 (define-its-state-machine its-zhuyin-cn-map
   "zhuyin-cn" "$AW"(BG" Chinese-GB
