From 96ddef421f006a76a6ecb269ba6e9c5f87876558 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 27 Jan 2001 18:45:56 +0000 Subject: [PATCH] tamago-4.0.1 --- Makefile | 110 +++++++++++++++++--------------------------------------- egg-dotemacs | 19 ++-------- egg-util.el | 62 ++++++++++++++++++++++++++++++++ its-keydef.el | 5 ++- its/hankata.el | 5 ++- its/hira.el | 39 ++++++++++++++------ its/kata.el | 2 +- leim-list.el | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ make-dirs.el | 48 +++++++++++++++++++++++++ 9 files changed, 289 insertions(+), 111 deletions(-) create mode 100644 egg-util.el create mode 100644 leim-list.el create mode 100644 make-dirs.el diff --git a/Makefile b/Makefile index 9e1a711..6307678 100644 --- 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 @@ -34,16 +24,18 @@ 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.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}) + diff --git a/egg-dotemacs b/egg-dotemacs index e0ac692..203a392 100644 --- a/egg-dotemacs +++ b/egg-dotemacs @@ -4,28 +4,13 @@ (set-language-info "Japanese" 'input-method "japanese-egg-wnn") -(defvar its-hira-enable-double-n t - "*Enable \"nn\" input for \"$B$s(B\" ") - -(defvar its-hira-period "$B!#(B" ;;; ". " "$B!%(B" - "*$B%T%j%*%I(B") - -(defvar its-hira-comma "$B!"(B" ;;; ", " "$B!$(B" - "*$B%3%s%^(B") - -(defvar its-hira-open-bracket "$B!V(B" ;;; "$B!N(B" - "*[") - -(defvar its-hira-close-bracket "$B!W(B" ;;; "$B!O(B" - "*]") - -(defvar its-hira-horizontal "$B!<(B" ;;; "$B!](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) ;; diff --git a/egg-util.el b/egg-util.el new file mode 100644 index 0000000..2bd840f --- /dev/null +++ b/egg-util.el @@ -0,0 +1,62 @@ +;;; egg-util.el --- Utilities with Egg + +;; Copyright (C) 2000 ElectroTechinical Laboratory, Japan +;; Copyright (C) 2000 TOMURA Satoru + +;; Author: TOMURA Satoru + +;; Maintainer: TOMURA Satoru + +;; 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))))) + diff --git a/its-keydef.el b/its-keydef.el index 6814fc1..6a087f2 100644 --- a/its-keydef.el +++ b/its-keydef.el @@ -1,14 +1,13 @@ ;;; its-keydef.el -;; Copyright (C) 1999, 2000 Free Software Foundation, Inc +;; Copyright (C) 1999, 2000 PFU LIMITED -;; Author: NIIBE Yutaka +;; Author: KATAYAMA Yoshio ;; Maintainer: TOMURA Satoru ;; Keywords: mule, multilingual, input method -;; Project Leader: Satoru Tomura ;; Keywords: mule, multilingual, input method ;; This file is part of EGG. diff --git a/its/hankata.el b/its/hankata.el index 73618f2..3aac351 100644 --- a/its/hankata.el +++ b/its/hankata.el @@ -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 +;; Author: NIIBE Yutaka ;; Maintainer: TOMURA Satoru diff --git a/its/hira.el b/its/hira.el index 502c362..86fd449 100644 --- a/its/hira.el +++ b/its/hira.el @@ -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 -;; jiro@math.keio.ac.jp (TANAKA Jiro) +;; Author: NIIBE Yutaka ;; Maintainer: TOMURA Satoru @@ -40,18 +38,39 @@ (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 \"$B$s(B\" ") -(defvar its-hira-period "$B!#(B" "*$B%T%j%*%I(B") ; ". " "$B!%(B" -(defvar its-hira-comma "$B!"(B" "*$B%3%s%^(B") ; ", " "$B!$(B" -(defvar its-hira-open-bracket "$B!V(B" "*[") ; "$B!N(B" -(defvar its-hira-close-bracket "$B!W(B" "*]") ; "$B!O(B" -(defvar its-hira-horizontal "$B!<(B" "*-") ; "$B!](B" +(defcustom its-hira-enable-double-n t + "*Enable \"nn\" input for \"$B$s(B\" " + :group 'hira :type 'boolean) + +(defcustom its-hira-period "$B!#(B" + "* .($B%T%j%*%I(B)$B$rF~NO$7$?$H$-$N6gE@$NJ8;z(B: \"$B!#(B\" \". \" \"$B!%(B\"" + :group 'hira :type 'string) + +(defcustom its-hira-comma "$B!"(B" + "* ,($B%3%s%^(B)$B$rF~NO$7$?$H$-$NFIE@$NJ8;z(B: \"$B!"(B\" \", \" \"$B!$(B\"" + :group 'hira :type 'string) + +(defcustom its-hira-open-bracket "$B!V(B" + "* [ $B$rF~NO$7$?$H$-$N$+$.3g8L3+$1$NJ8;z(B: \"$B!V(B\" \"$B!N(B\"" + :group 'hira :type 'string) + +(defcustom its-hira-close-bracket "$B!W(B" + "* ] $B$rF~NO$7$?$H$-$N$+$.3g8LJD$8$NJ8;z(B: \"$B!W(B\" \"$B!O(B\"" + :group 'hira :type 'string) + +(defcustom its-hira-horizontal "$B!<(B" + "* - $B$rF~NO$7$?$H$-$ND92;5-9f$NJ8;z(B: \"$B!<(B\" \"$B!](B\"" + :group 'hira :type 'string) (define-its-state-machine its-hira-map "roma-kana" "$B$"(B" Japanese diff --git a/its/kata.el b/its/kata.el index 28e1dcd..6784951 100644 --- a/its/kata.el +++ b/its/kata.el @@ -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 -;; jiro@math.keio.ac.jp (TANAKA Jiro) ;; Maintainer: TOMURA Satoru diff --git a/leim-list.el b/leim-list.el new file mode 100644 index 0000000..535c4b1 --- /dev/null +++ b/leim-list.el @@ -0,0 +1,110 @@ +;;; leim-list-egg.el --- Egg setup for leim API + +;; Copyright (C) 1999, 2000 Free Software Foundation, Inc + +;; Author: NIIBE Yutaka +;; KATAYAMA Yoshio + +;; Maintainer: TOMURA Satoru + +;; 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 + "$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 + "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-zy" "Chinese-GB" 'egg-activate-wnn + "$AW"(BG" "Zhunyin -> Simplified Hanzi" + 'its-select-zhuyin-cn) + + (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-wb" "Chinese-GB" 'egg-activate-wnn + "$ANe(B" "WuBi Simplified Hanzi inputmethod" + 'its-select-wubi) + + (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-cns-egg-wnn-zy" "Chinese-CNS" 'egg-activate-wnn + "$(GNC(BC" "Zhunyin -> Traditional Hanzi" + 'its-select-zhuyin-tw) + + (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") + + (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 index 0000000..74c1613 --- /dev/null +++ b/make-dirs.el @@ -0,0 +1,48 @@ +;;; make-emacs-conf.el --- + +;; Copyright (C) 2000 ElectroTechnical Laboratory +;; Copyright (C) 2000 TOMURA Satoru +;; Licensed to Free Software Foundation, Inc. + +;; Author: TOMURA Satoru + +;; Maintainer: TOMURA Satoru + +;; 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) -- 1.7.10.4