This commit was generated by cvs2svn to compensate for changes in r5, which
authorakr <akr>
Sat, 27 Jan 2001 18:45:56 +0000 (18:45 +0000)
committerakr <akr>
Sat, 27 Jan 2001 18:45:56 +0000 (18:45 +0000)
included commits to RCS files with non-trunk default branches.

Makefile
egg-dotemacs
egg-util.el [new file with mode: 0644]
its-keydef.el
its/hankata.el
its/hira.el
its/kata.el
leim-list.el [new file with mode: 0644]
make-dirs.el [new file with mode: 0644]

index 9e1a711..6307678 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,25 +7,15 @@
 
 #---------------------------------------
 # (1) make
-#      ;; compile *.el files and make leim-list.el
-# (2) make install-system
-#      ;; install files into ${INSDIR} and ${LEIMDIR}
-# (3) make install-user
-#      ;; install your initialization files at your home directory
+#      ;; compile *.el files
+# (2) make install
+#      ;; install files into the emacs site-lisp directory
+#       ;; ex. /usr/local/share/emacs/site-lisp/egg
 #------------------------------------------------
 #  Configuration parameters
 #------------------------------------------------
-# Emacs initialization file at your home directory
-       DOTEMACS= ${HOME}/.emacs
-# egg initialization file at your home directory
-       STARTUP = .eggrc
-       EGGRC   = ${HOME}/${START}
 # emacs you use
        EMACS   = /usr/local/bin/emacs
-# Egg does not depend on the emacs version (We hope...)
-       INSDIR  = /usr/local/share/emacs/site-lisp/egg
-# The directory where there is leim-list.el in it.
-       LEIMDIR = /usr/local/share/emacs/20.4/leim
 # Programs
        INSTALL = /usr/sbin/install
        CP      = /bin/cp
        MKDIR   = /usr/bin/mkdir
 #------------------------------------------------
 
-
 DEPS = -l ./docomp.el
-BATCHFLAGS = -batch -q -no-site-file
+BATCHFLAGS = -batch -q -no-site-file -no-init-file
 
 .SUFFIXES: .el .elc
 
-ETCS = Makefile docomp.el eggrc leim-list-egg.el egg-dotemacs \
-       AUTHORS ChangeLog README TODO PROBLEMS
+ETCS = Makefile docomp.el egg-dotemacs \
+       AUTHORS ChangeLog README TODO PROBLEMS make-dirs.el
+
+ELS  =  eggrc leim-list.el
 
-SRCS = menudiag.el its.el egg-edep.el \
+SRCS = egg-util.el \
+       menudiag.el its.el egg-edep.el \
        its/ascii.el \
        its/bixing.el \
        its/erpin.el \
@@ -66,53 +58,36 @@ SRCS = menudiag.el its.el egg-edep.el \
 
 ELCS = ${SRCS:.el=.elc}
 
-DIST = ${ETCS} ${SRCS}
+DIST = ${ETCS} ${SRCS} ${ELS}
 
 .el.elc:
        ${EMACS} ${BATCHFLAGS} ${DEPS} -f batch-byte-compile $<
 
-all: ${ELCS} leim-list.el
+all: ${ELCS} dirs
 
-leim-list.el: leim-list-egg.el
-       @if (grep ";;; leim-list-egg.el" \
-                 ${LEIMDIR}/leim-list.el 2>&1) >/dev/null; then \
-         echo Egg setup already exists in ${LEIMDIR}/leim-list.el; \
-         cat ${LEIMDIR}/leim-list.el  >leim-list.el; \
-       else \
-         cat ${LEIMDIR}/leim-list.el leim-list-egg.el >leim-list.el; \
-       fi
+dirs:  ${EMACS}
+       @${EMACS} ${BATCHFLAGS} -l ./make-dirs.el 2> /dev/null
 
 clean: 
-       ${RM} -f ${ELCS} leim-list.el
-
-install: install-system
-
-install-system: all
-       if [ ! -d ${INSDIR} ]; then mkdir -p ${INSDIR}; fi
-       tar cf - ${SRCS} ${ELCS} | (cd ${INSDIR} && tar xvf -)
-       ${CP} leim-list.el ${INSDIR}
-
-uninstall-system:
-       if [ -d ${INSDIR} ]; then \
-         ${RM} -rf ${INSDIR}; \
+       ${RM} -f ${ELCS} dirs *~ */*~
+
+install: install-site
+
+install-site: all
+       @. ./dirs; \
+       echo "Egg system will be installed in $${INSDIR}/egg...."; \
+       if [ -d $${INSDIR}/egg ]; then \
+           echo "Clean up the previsous installation...."; \
+           ${RM} -rf $${INSDIR}/egg; fi ; \
+       mkdir -p $${INSDIR}/egg; \
+       tar cf - ${SRCS} ${ELCS} ${ELS} | (cd $${INSDIR}/egg && tar xpBf -)
+
+uninstall-site:
+       . ./dirs; \
+       if [ -d $${INSDIR}/egg ]; then \
+         ${RM} -rf $${INSDIR}/egg; \
        fi
 
-
-install-user: dotemacs ${EGGRC}
-
-dotemacs: egg-dotemacs
-       @if (grep "^;;; Emacs/Egg Configuration" \
-                  $(DOTEMACS) 2>&1) >/dev/null; then \
-          echo Emacs/Egg setup already exists in $(DOTEMACS); \
-       else \
-         cat egg-dotemacs >> ${DOTEMACS} ; \
-         echo "(setq egg-startup-file \"${STARTUP}\")" >>${DOTEMACS} ; \
-         echo "Added Emacs/Egg setup to $(DOTEMACS)"; \
-       fi
-
-${EGGRC}: eggrc
-       $(CP) eggrc ${EGGRC}
-
 # DEPENDENCIES
 egg/sj3rpc.elc: egg-com.elc egg/sj3.elc
 egg/wnnrpc.elc: egg-com.elc egg/wnn.elc
@@ -122,23 +97,4 @@ egg.elc its/ascii.elc its/erpin.elc its/hankata.elc \
        its/hangul.elc its/kata.elc its/quanjiao.elc \
        its/zenkaku.elc its/zhuyin.elc: its-keydef.elc
 
-distclean:
-       rm -f ${ELCS} leim-list.el *~
-
-###  Source code maintainance
-DATE=$(shell date "+%y%m%d")
-
-dist: distclean
-       rm -rf ../egg-${DATE}
-       mkdir ../egg-${DATE}
-       tar -c -f - ${DIST} | tar Cxf ../egg-${DATE} -
-       (cd ../egg-${DATE}; \
-        sed "/^### Source code maintainance/,\$$d" <Makefile >Makefile.dist; \
-        mv -f Makefile.dist Makefile)
-       (cd ..; tar cvzf egg-${DATE}.tar.gz egg-${DATE})
-
-working-ss: distclean
-       rm -rf ../egg-snap-${DATE}
-       mkdir ../egg-snap-${DATE}
-       tar -c -f - . | tar Cxf ../egg-snap-${DATE} -
-       (cd ..; tar cvzf egg-snap-${DATE}.tar.gz egg-snap-${DATE})
+
index e0ac692..203a392 100644 (file)
@@ -4,28 +4,13 @@
 
 (set-language-info "Japanese"    'input-method "japanese-egg-wnn")
 
-(defvar its-hira-enable-double-n t
-  "*Enable \"nn\" input for \"\e$B$s\e(B\" ")
-
-(defvar its-hira-period "\e$B!#\e(B" ;;; ". " "\e$B!%\e(B"
-  "*\e$B%T%j%*%I\e(B")
-
-(defvar its-hira-comma  "\e$B!"\e(B" ;;; ", " "\e$B!$\e(B"
-  "*\e$B%3%s%^\e(B") 
-
-(defvar its-hira-open-bracket  "\e$B!V\e(B" ;;; "\e$B!N\e(B"
-  "*[") 
-
-(defvar its-hira-close-bracket  "\e$B!W\e(B" ;;; "\e$B!O\e(B"
-  "*]") 
-
-(defvar its-hira-horizontal  "\e$B!<\e(B" ;;; "\e$B!]\e(B"
-  "*-")
+;;; Try M-x customize-gropu hira
 
 (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")
 
 (require 'egg)
+(require 'its/hira)
 
 ;; </Egg>
diff --git a/egg-util.el b/egg-util.el
new file mode 100644 (file)
index 0000000..2bd840f
--- /dev/null
@@ -0,0 +1,62 @@
+;;; 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 (substring (file-name-directory path) 0 -1)
+                                  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 6814fc1..6a087f2 100644 (file)
@@ -1,14 +1,13 @@
 ;;; its-keydef.el
 
-;; Copyright (C) 1999, 2000 Free Software Foundation, Inc
+;; Copyright (C) 1999, 2000 PFU LIMITED
 
-;; Author: NIIBE Yutaka <gniibe@chroot.org>
+;; Author: KATAYAMA Yoshio <kate@pfu.co.jp>
 
 ;; Maintainer: TOMURA Satoru <tomura@etl.go.jp>
 
 ;; Keywords: mule, multilingual, input method
 
-;; Project Leader: Satoru Tomura <tomura@etl.go.jp>
 ;; Keywords: mule, multilingual, input method
 
 ;; This file is part of EGG.
index 73618f2..3aac351 100644 (file)
@@ -1,9 +1,8 @@
 ;;; its/hankata.el --- Hnakaku Katakana Input in Egg Input Method Architecture
 
-;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
+;; Copyright (C) 1999, 2000 Free Software Foundation, Inc
 
-;; Author: Satoru Tomura <tomura@etl.go.jp>
+;; Author: NIIBE Yutaka <gniibe@chroot.org>
 
 ;; Maintainer: TOMURA Satoru <tomura@etl.go.jp>
 
index 502c362..86fd449 100644 (file)
@@ -1,10 +1,8 @@
 ;;; its/hira.el --- Hiragana Input in Egg Input Method Architecture
 
-;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
+;; Copyright (C) 1999, 2000 Free Software Foundation, Inc
 
-;; Author: Satoru Tomura <tomura@etl.go.jp>
-;;         jiro@math.keio.ac.jp (TANAKA Jiro)
+;; Author: NIIBE Yutaka <gniibe@chroot.org>
 
 ;; Maintainer: TOMURA Satoru <tomura@etl.go.jp>
 
 (eval-when (compile)
   (defconst its-compaction-enable t))
 
+(defgroup hira nil
+  "Hiragana Input Method"
+  :group 'its)
+
 (defvar its-hira-enable-zenkaku-alphabet
   (if (boundp 'its-enable-fullwidth-alphabet)
       its-enable-fullwidth-alphabet
     t)
   "*Enable Zenkaku alphabet")
 
-(defvar its-hira-enable-double-n nil "*Enable \"nn\" input for \"\e$B$s\e(B\" ")
-(defvar its-hira-period "\e$B!#\e(B" "*\e$B%T%j%*%I\e(B")  ; ". " "\e$B!%\e(B"
-(defvar its-hira-comma  "\e$B!"\e(B" "*\e$B%3%s%^\e(B")    ; ", " "\e$B!$\e(B"
-(defvar its-hira-open-bracket  "\e$B!V\e(B" "*[")  ; "\e$B!N\e(B"
-(defvar its-hira-close-bracket  "\e$B!W\e(B" "*]") ; "\e$B!O\e(B"
-(defvar its-hira-horizontal  "\e$B!<\e(B" "*-")    ; "\e$B!]\e(B"
+(defcustom its-hira-enable-double-n t
+  "*Enable \"nn\" input for \"\e$B$s\e(B\" "
+  :group 'hira :type 'boolean)
+
+(defcustom its-hira-period "\e$B!#\e(B" 
+  "* .(\e$B%T%j%*%I\e(B)\e$B$rF~NO$7$?$H$-$N6gE@$NJ8;z\e(B: \"\e$B!#\e(B\"  \". \" \"\e$B!%\e(B\""
+  :group 'hira :type 'string)
+
+(defcustom its-hira-comma  "\e$B!"\e(B"
+ "* ,(\e$B%3%s%^\e(B)\e$B$rF~NO$7$?$H$-$NFIE@$NJ8;z\e(B: \"\e$B!"\e(B\" \", \" \"\e$B!$\e(B\""
+  :group 'hira :type 'string)
+
+(defcustom its-hira-open-bracket  "\e$B!V\e(B"
+ "* [ \e$B$rF~NO$7$?$H$-$N$+$.3g8L3+$1$NJ8;z\e(B: \"\e$B!V\e(B\" \"\e$B!N\e(B\""
+  :group 'hira :type 'string)
+
+(defcustom its-hira-close-bracket "\e$B!W\e(B"
+ "* ] \e$B$rF~NO$7$?$H$-$N$+$.3g8LJD$8$NJ8;z\e(B: \"\e$B!W\e(B\" \"\e$B!O\e(B\""
+  :group 'hira :type 'string)
+
+(defcustom its-hira-horizontal  "\e$B!<\e(B"
+  "* - \e$B$rF~NO$7$?$H$-$ND92;5-9f$NJ8;z\e(B: \"\e$B!<\e(B\" \"\e$B!]\e(B\""
+  :group 'hira :type 'string)
 
 (define-its-state-machine its-hira-map
   "roma-kana" "\e$B$"\e(B" Japanese
index 28e1dcd..6784951 100644 (file)
@@ -1,10 +1,10 @@
 ;;; its/kata.el --- Katakana Input in Egg Input Method Architecture
 
+
 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
 ;; Licensed to the Free Software Foundation.
 
 ;; Author: Satoru Tomura <tomura@etl.go.jp>
-;;         jiro@math.keio.ac.jp (TANAKA Jiro)
 
 ;; Maintainer: TOMURA Satoru <tomura@etl.go.jp>
 
diff --git a/leim-list.el b/leim-list.el
new file mode 100644 (file)
index 0000000..535c4b1
--- /dev/null
@@ -0,0 +1,110 @@
+;;; leim-list-egg.el --- Egg setup for leim API
+
+;; Copyright (C) 1999, 2000 Free Software Foundation, Inc
+
+;; Author: NIIBE Yutaka <gniibe@chroot.org>
+;;         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:
+
+;;; leim-list-egg.el --- Egg setup for leim API
+;;; CAUTION: Don't delete the above line.
+
+(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)
+
+  (register-input-method
+   "japanese-egg-wnn" "Japanese" 'egg-activate-wnn
+   "\e$B$"\e(B.."  "Romaji -> Hiragana -> Kanji&Kana"
+   'its-select-hiragana)
+
+  (register-input-method
+   "japanese-egg-sj3" "Japanese" 'egg-activate-sj3
+   "\e$B$"\e(B.."  "Romaji -> Hiragana -> Kanji&Kana"
+   'its-select-hiragana)
+
+  (register-input-method
+   "chinese-gb-egg-wnn-py" "Chinese-GB" 'egg-activate-wnn
+   "\e$AF4\e(BG"  "Pinyin -> Simplified Hanzi"
+   'its-select-pinyin-cn)
+
+  (register-input-method
+   "chinese-gb-egg-wnn-zy" "Chinese-GB" 'egg-activate-wnn
+   "\e$AW"\e(BG"  "Zhunyin -> Simplified Hanzi"
+   'its-select-zhuyin-cn)
+
+  (register-input-method
+   "chinese-gb-egg-wnn-qm" "Chinese-GB" 'egg-activate-wnn
+   "\e$AG.\e(B"  "QianMa Simplified Hanzi inputmethod"
+   'its-select-qianma)
+
+  (register-input-method
+   "chinese-gb-egg-wnn-wb" "Chinese-GB" 'egg-activate-wnn
+   "\e$ANe\e(B"  "WuBi Simplified Hanzi inputmethod"
+   'its-select-wubi)
+
+  (register-input-method
+   "chinese-cns-egg-wnn-py" "Chinese-CNS" 'egg-activate-wnn
+   "\e$(GQ;\e(BC"  "Pinyin -> Traditional Hanzi"
+   'its-select-pinyin-tw)
+
+  (register-input-method
+   "chinese-cns-egg-wnn-zy" "Chinese-CNS" 'egg-activate-wnn
+   "\e$(GNC\e(BC"  "Zhunyin -> Traditional Hanzi"
+   'its-select-zhuyin-tw)
+
+  (register-input-method
+   "korean-egg-wnn" "Korean" 'egg-activate-wnn
+   "\e$(CGQ\e(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")
+
+  (require 'egg)
+  (require 'its/hira)
+
+;;;;
+
+  (require 'egg-util)
+
+  (defun load-leim-list-except-this ()
+    (load-libraries "leim-list" (cdr-safe
+                                (member (substring 
+                                         (file-name-directory
+                                          load-file-name)
+                                         0 -1)
+                                        load-path))))
+
+  (message "Finished loading %s \n   and load others..." load-file-name)
+  (load-leim-list-except-this)
+
+  )
\ No newline at end of file
diff --git a/make-dirs.el b/make-dirs.el
new file mode 100644 (file)
index 0000000..74c1613
--- /dev/null
@@ -0,0 +1,48 @@
+;;; make-emacs-conf.el --- 
+
+;; Copyright (C) 2000 ElectroTechnical Laboratory
+;; Copyright (C) 2000 TOMURA Satoru <tomura@etl.go.jp>
+;; Licensed to Free Software Foundation, Inc.
+
+;; 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:
+
+(defun make-emacs-configuration-file ()
+  (with-temp-buffer
+    (let* ((etc-dir data-directory)
+          (ver-dir (file-name-directory (substring etc-dir 0 -1)))
+          (emacs-dir (file-name-directory (substring ver-dir 0 -1))))
+      (insert 
+       ;;; INSDIR=/usr/local/share/emacs/site-lisp
+       (format "INSDIR=%s/site-lisp\n"
+              (substring emacs-dir 0 -1))
+       ;;; VINSDIR=/usr/local/share/emacs/20.5/site-lisp        
+       (format "VINSDIR=%s/site-lisp\n"
+              (substring ver-dir 0 -1)))
+      (write-file "dirs" nil))))
+
+(make-emacs-configuration-file)