]> git.eshelyaron.com Git - emacs.git/commitdiff
*** empty log message ***
authorKenichi Handa <handa@m17n.org>
Fri, 25 Aug 2000 02:37:11 +0000 (02:37 +0000)
committerKenichi Handa <handa@m17n.org>
Fri, 25 Aug 2000 02:37:11 +0000 (02:37 +0000)
ChangeLog
leim/ChangeLog
leim/ja-dic/ja-dic.el
leim/ja-dic/ja-dic.elc [new file with mode: 0644]
lisp/ChangeLog
lisp/international/skkdic-cnv.el [deleted file]
lisp/international/skkdic-utl.el [deleted file]

index 37fddce102c68e26fc370e55ea9ae2f41cb0d382..85e460e79508f0b4d5f30da6b45be49a3f46a4cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
 2000-08-25  Kenichi Handa  <handa@etl.go.jp>
 
-       * leim-Makefile.in: Rename skkdic to ja-dic through out the file.
+       * leim-Makefile.in: Rename skkdic to ja-dic throughout the file.
 
 2000-08-24  Gerd Moellmann  <gerd@gnu.org>
 
index bc29bffd8a0cb32efbf5803b0d7bbac46898b854..48a98126187d753a07afa0778cda98aaff7be3ea 100644 (file)
@@ -2,7 +2,7 @@
 
        * ja-dic: Directory name changed from skkdic.
 
-       * ja-dic/ja-dic.el[c]: Renamed from skkdic.el[c].
+       * ja-dic/ja-dic.el[c]: Re-generated by the new ja-dic-cnv.el.
 
        * README: Rename skkdic to ja-dic throughout the file.
 
index e98c0f405fea933b44389ee73317bc3b17b47836..c36e5e523b35edc148fbba1ad4d44be19907b24c 100644 (file)
@@ -1,6 +1,6 @@
-;; skkdic.el -- dictionary for Japanese input method
+;; ja-dic.el -- dictionary for Japanese input method
 ;;     Generated by the command `skkdic-convert'
-;;     Date: Fri Aug 25 09:40:31 2000
+;;     Date: Fri Aug 25 11:06:13 2000
 ;;     Original SKK dictionary file: SKK-JISYO.L
 
 ;;; Comment:
@@ -38,7 +38,7 @@
 
 ;;; Code:
 
-(eval-when-compile (require 'skkdic-cnv))
+(eval-when-compile (require 'ja-dic-cnv))
 
 ;; Setting okuri-ari entries.
 (skkdic-set-okuri-ari
 )
 
 ;;
-(provide 'skkdic)
+(provide 'ja-dic)
 
-;; skkdic.el ends here
+;; ja-dic.el ends here
diff --git a/leim/ja-dic/ja-dic.elc b/leim/ja-dic/ja-dic.elc
new file mode 100644 (file)
index 0000000..8e59ef8
Binary files /dev/null and b/leim/ja-dic/ja-dic.elc differ
index 368783ff2863e79af57c98985728bb53413242dc..2cad7f2328268a42fc08b170b2858c9825f08cbb 100644 (file)
@@ -1,3 +1,22 @@
+2000-08-25  Kenichi Handa  <handa@etl.go.jp>
+
+       * international/kkc.el: Remove SKK from Keywords.  Require
+       ja-dic-utl instead of skkdic-utl.
+
+       * international/ja-dic-cnv.el: Renamed from skkdic-cnv.el.
+       Provide ja-dic-cnv instead of skkdic-cnv.
+       (ja-dic-filename): Renamed from skkdic-filename.  Referers changed
+       (iso-2022-7bit-short): Add safe-charsets property.
+       (skkdic-convert-postfix): Search Japanese chou-on character in
+       addition to Hiragana character.
+       (skkdic-convert-prefix, skkdic-collect-okuri-nasi): Likewise.
+       (skkdic-convert): Change file names from skkdic.el to ja-dic.el
+       (batch-skkdic-convert): Likewise.
+
+       * international/ja-dic-utl.el: Renamed from skkdic-utl.el.
+       Provide ja-dic-utl instead of skkdic-utl.
+       (skkdic-lookup-key): Load ja-dic/ja-dic, not skkdic/skkdic.
+
 2000-08-24  Dave Love  <fx@gnu.org>
 
        * disp-table.el (standard-display-default): Make the test of `l'
diff --git a/lisp/international/skkdic-cnv.el b/lisp/international/skkdic-cnv.el
deleted file mode 100644 (file)
index 186cc8b..0000000
+++ /dev/null
@@ -1,560 +0,0 @@
-;;; skkdic-cnv.el --- Convert a SKK dictionary for `skkdic-utl'
-
-;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
-
-;; Keywords: mule, multilingual, Japanese, SKK
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs 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.
-
-;; GNU Emacs 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:
-
-;; SKK is a Japanese input method running on Mule created by Masahiko
-;; Sato <masahiko@sato.riec.tohoku.ac.jp>.  Here we provide utilities
-;; to handle a dictionary distributed with SKK so that a different
-;; input method (e.g. quail-japanese) can utilize the dictionary.
-
-;; The format of SKK dictionary is quite simple.  Each line has the
-;; form "KANASTRING /CONV1/CONV2/.../" which means KANASTRING (\e$B2>L>J8\e(B
-;; \e$B;zNs\e(B) can be converted to one of CONVi.  CONVi is a Kanji (\e$B4A;z\e(B)
-;; and Kana (\e$B2>L>\e(B) mixed string.
-;;
-;; KANASTRING may have a trailing ASCII letter for Okurigana (\e$BAw$j2>L>\e(B)
-;; information.  For instance, the trailing letter `k' means that one
-;; of the following Okurigana is allowed: \e$B$+$-$/$1$3\e(B.  So, in that
-;; case, the string "KANASTRING\e$B$/\e(B" can be converted to one of "CONV1\e$B$/\e(B",
-;; CONV2\e$B$/\e(B, ...
-
-;;; Code:
-
-;; Name of a file to generate from SKK dictionary.
-(defvar skkdic-filename "skkdic.el")
-
-;; To make a generated skkdic.el smaller.
-(make-coding-system
- 'iso-2022-7bit-short
- 2 ?J
- "Like `iso-2022-7bit' but no ASCII designation before SPC."
- '(ascii nil nil nil t t nil t))
-
-(defun skkdic-convert-okuri-ari (skkbuf buf)
-  (message "Processing OKURI-ARI entries ...")
-  (goto-char (point-min))
-  (save-excursion
-    (set-buffer buf)
-    (insert ";; Setting okuri-ari entries.\n"
-           "(skkdic-set-okuri-ari\n"))
-  (while (not (eobp))
-    (let ((from (point))
-         to)
-      (end-of-line)
-      (setq to (point))
-
-      (save-excursion
-       (set-buffer buf)
-       (insert-buffer-substring skkbuf from to)
-       (beginning-of-line)
-       (insert "\"")
-       (search-forward " ")
-       (delete-char 1)                 ; delete the first '/'
-       (let ((p (point)))
-         (end-of-line)
-         (delete-char -1)              ; delete the last '/'
-         (subst-char-in-region p (point) ?/ ? 'noundo))
-       (insert "\"\n"))
-
-      (forward-line 1)))
-  (save-excursion
-    (set-buffer buf)
-    (insert ")\n\n")))
-
-(defconst skkdic-postfix-list '(skkdic-postfix-list))
-
-(defconst skkdic-postfix-data
-  '(("\e$B$$$-\e(B" "\e$B9T\e(B")
-    ("\e$B$,$+$j\e(B" "\e$B78\e(B")
-    ("\e$B$,$/\e(B" "\e$B3X\e(B")
-    ("\e$B$,$o\e(B" "\e$B@n\e(B")
-    ("\e$B$7$c\e(B" "\e$B<R\e(B")
-    ("\e$B$7$e$&\e(B" "\e$B=8\e(B")
-    ("\e$B$7$g$&\e(B" "\e$B>^\e(B" "\e$B>k\e(B")
-    ("\e$B$8$g$&\e(B" "\e$B>k\e(B")
-    ("\e$B$;$s\e(B" "\e$B@~\e(B")
-    ("\e$B$@$1\e(B" "\e$B3Y\e(B")
-    ("\e$B$A$c$/\e(B" "\e$BCe\e(B")
-    ("\e$B$F$s\e(B" "\e$BE9\e(B")
-    ("\e$B$H$&$2\e(B" "\e$BF=\e(B")
-    ("\e$B$I$*$j\e(B" "\e$BDL$j\e(B")
-    ("\e$B$d$^\e(B" "\e$B;3\e(B")
-    ("\e$B$P$7\e(B" "\e$B66\e(B")
-    ("\e$B$O$D\e(B" "\e$BH/\e(B")
-    ("\e$B$b$/\e(B" "\e$BL\\e(B")
-    ("\e$B$f$-\e(B" "\e$B9T\e(B")))
-
-(defun skkdic-convert-postfix (skkbuf buf)
-  (message "Processing POSTFIX entries ...")
-  (goto-char (point-min))
-  (save-excursion
-    (set-buffer buf)
-    (insert ";; Setting postfix entries.\n"
-           "(skkdic-set-postfix\n"))
-
-  ;; Initialize SKKDIC-POSTFIX-LIST by predefined data
-  ;; SKKDIC-POSTFIX-DATA.
-  (save-excursion
-    (set-buffer buf)
-    (let ((l skkdic-postfix-data)
-         kana candidates entry)
-      (while l
-       (setq kana (car (car l)) candidates (cdr (car l)))
-       (insert "\"" kana)
-       (while candidates
-         (insert " " (car candidates))
-         (setq entry (lookup-nested-alist (car candidates)
-                                          skkdic-postfix-list nil nil t))
-         (if (consp (car entry))
-             (setcar entry (cons kana (car entry)))
-           (set-nested-alist (car candidates) (list kana)
-                             skkdic-postfix-list))
-         (setq candidates (cdr candidates)))
-       (insert "\"\n")
-       (setq l (cdr l)))))
-
-  ;; Search postfix entries.
-  (while (re-search-forward "^[#<>?]\\(\\cH+\\) " nil t)
-    (let ((kana (match-string 1))
-         str candidates)
-      (while (looking-at "/[#0-9 ]*\\([^/\n]*\\)/")
-       (setq str (match-string 1))
-       (if (not (member str candidates))
-           (setq candidates (cons str candidates)))
-       (goto-char (match-end 1)))
-      (save-excursion
-       (set-buffer buf)
-       (insert "\"" kana)
-       (while candidates
-         (insert " " (car candidates))
-         (let ((entry (lookup-nested-alist (car candidates)
-                                           skkdic-postfix-list nil nil t)))
-           (if (consp (car entry))
-               (if (not (member kana (car entry)))
-                   (setcar entry (cons kana (car entry))))
-             (set-nested-alist (car candidates) (list kana)
-                               skkdic-postfix-list)))
-         (setq candidates (cdr candidates)))
-       (insert "\"\n"))))
-  (save-excursion
-    (set-buffer buf)
-    (insert ")\n\n")))
-         
-(defconst skkdic-prefix-list '(skkdic-prefix-list))
-
-(defun skkdic-convert-prefix (skkbuf buf)
-  (message "Processing PREFIX entries ...")
-  (goto-char (point-min))
-  (save-excursion
-    (set-buffer buf)
-    (insert ";; Setting prefix entries.\n"
-           "(skkdic-set-prefix\n"))
-  (save-excursion
-    (while (re-search-forward "^\\(\\cH+\\)[<>?] " nil t)
-      (let ((kana (match-string 1))
-           str candidates)
-       (while (looking-at "/\\([^/\n]+\\)/")
-         (setq str (match-string 1))
-         (if (not (member str candidates))
-             (setq candidates (cons str candidates)))
-         (goto-char (match-end 1)))
-       (save-excursion
-         (set-buffer buf)
-         (insert "\"" kana)
-         (while candidates
-           (insert " " (car candidates))
-           (set-nested-alist (car candidates) kana skkdic-prefix-list)
-           (setq candidates (cdr candidates)))
-         (insert "\"\n")))))
-  (save-excursion
-    (set-buffer buf)
-    (insert ")\n\n")))
-         
-;; FROM and TO point the head and tail of "/J../J../.../".
-(defun skkdic-get-candidate-list (from to)
-  (let (candidates)
-    (goto-char from)
-    (while (re-search-forward "/\\cj+" to t)
-      (setq candidates (cons (buffer-substring (1+ (match-beginning 0))
-                                              (match-end 0))
-                            candidates)))
-    candidates))
-
-;; Return entry for STR from nested alist ALIST.
-(defsubst skkdic-get-entry (str alist)
-  (car (lookup-nested-alist str alist nil nil t)))
-
-
-(defconst skkdic-word-list '(skkdic-word-list))
-
-;; Return t if substring of STR (between FROM and TO) can be broken up
-;; to chunks all of which can be derived from another entry in SKK
-;; dictionary.  SKKBUF is the buffer where the original SKK dictionary
-;; is visited, KANA is the current entry for STR.  FIRST is t iff this
-;; is called at top level.
-
-(defun skkdic-breakup-string (skkbuf kana str from to &optional first)
-  (let ((len (- to from)))
-    (or (and (>= len 2)
-            (let ((min-idx (+ from 2))
-                  (idx (if first (1- to ) to))
-                  (found nil))
-              (while (and (not found) (>= idx min-idx))
-                (let ((kana2-list (skkdic-get-entry
-                                   (substring str from idx)
-                                   skkdic-word-list)))
-                  (if (or (and (consp kana2-list)
-                               (let ((kana-len (length kana))
-                                     kana2)
-                                 (catch 'skkdic-tag
-                                   (while kana2-list
-                                     (setq kana2 (car kana2-list))
-                                     (if (string-match kana2 kana)
-                                         (throw 'skkdic-tag t))
-                                     (setq kana2-list (cdr kana2-list)))))
-                               (or (= idx to)
-                                   (skkdic-breakup-string skkbuf kana str
-                                                          idx to)))
-                          (and (stringp kana2-list)
-                               (string-match kana2-list kana)))
-                      (setq found t)
-                    (setq idx (1- idx)))))
-              found))
-       (and first
-            (> len 2)
-            (let ((kana2 (skkdic-get-entry
-                          (substring str from (1+ from))
-                          skkdic-prefix-list)))
-              (and (stringp kana2)
-                   (eq (string-match kana2 kana) 0)))
-            (skkdic-breakup-string skkbuf kana str (1+ from) to))
-       (and (not first)
-            (>= len 1)
-            (let ((kana2-list (skkdic-get-entry
-                               (substring str from to)
-                               skkdic-postfix-list)))
-              (and (consp kana2-list)
-                   (let (kana2)
-                     (catch 'skkdic-tag
-                       (while kana2-list
-                         (setq kana2 (car kana2-list))
-                         (if (string= kana2
-                                      (substring kana (- (length kana2))))
-                             (throw 'skkdic-tag t))
-                         (setq kana2-list (cdr kana2-list)))))))))))
-
-;; Return list of candidates which excludes some from CANDIDATES.
-;; Excluded candidates can be derived from another entry.
-
-(defun skkdic-reduced-candidates (skkbuf kana candidates)
-  (let (elt l)
-    (while candidates
-      (setq elt (car candidates))
-      (if (or (= (length elt) 1)
-             (and (string-match "^\\cj" elt)
-                  (not (skkdic-breakup-string skkbuf kana elt 0 (length elt)
-                                              'first))))
-         (setq l (cons elt l)))
-      (setq candidates (cdr candidates)))
-    (nreverse l)))
-
-(defconst skkdic-okuri-nasi-entries (list nil))
-(defconst skkdic-okuri-nasi-entries-count 0)
-
-(defun skkdic-collect-okuri-nasi ()
-  (message "Collecting OKURI-NASI entries ...")
-  (save-excursion
-    (let ((prev-ratio 0)
-         ratio)
-      (while (re-search-forward "^\\(\\cH+\\) \\(/\\cj.*\\)/$" nil t)
-       (let ((kana (match-string 1))
-             (candidates (skkdic-get-candidate-list (match-beginning 2)
-                                                    (match-end 2))))
-         (setq skkdic-okuri-nasi-entries
-               (cons (cons kana candidates) skkdic-okuri-nasi-entries)
-               skkdic-okuri-nasi-entries-count
-               (1+ skkdic-okuri-nasi-entries-count))
-         (setq ratio (floor (/ (* (point) 100.0) (point-max))))
-         (if (/= ratio prev-ratio)
-             (progn
-               (message "collected %2d%% %s ..." ratio kana)
-               (setq prev-ratio ratio)))
-         (while candidates
-           (let ((entry (lookup-nested-alist (car candidates)
-                                             skkdic-word-list nil nil t)))
-             (if (consp (car entry))
-                 (setcar entry (cons kana (car entry)))
-               (set-nested-alist (car candidates) (list kana)
-                                 skkdic-word-list)))
-           (setq candidates (cdr candidates))))))))
-
-(defun skkdic-convert-okuri-nasi (skkbuf buf)
-  (message "Processing OKURI-NASI entries ...")
-  (save-excursion
-    (set-buffer buf)
-    (insert ";; Setting okuri-nasi entries.\n"
-           "(skkdic-set-okuri-nasi\n")
-    (let ((l (nreverse skkdic-okuri-nasi-entries))
-         (count 0)
-         (prev-ratio 0)
-         ratio)
-      (while l
-       (let ((kana (car (car l)))
-             (candidates (cdr (car l))))
-         (setq ratio (/ (* count 1000) skkdic-okuri-nasi-entries-count)
-               count (1+ count))
-         (if (/= prev-ratio (/ ratio 10))
-             (progn
-               (message "processed %2d%% %s ..." (/ ratio 10) kana)
-               (setq prev-ratio (/ ratio 10))))
-         (if (setq candidates
-                   (skkdic-reduced-candidates skkbuf kana candidates))
-             (progn
-               (insert "\"" kana)
-               (while candidates
-                 (insert " " (car candidates))
-                 (setq candidates (cdr candidates)))
-               (insert "\"\n"))))
-       (setq l (cdr l))))
-    (insert ")\n\n")))
-
-(defun skkdic-convert (filename &optional dirname)
-  "Convert SKK dictionary of FILENAME into the file \"skkdic.el\".
-Optional argument DIRNAME if specified is the directory name under which
-the generated \"skkdic.el\" is saved."
-  (interactive "FSKK dictionary file: ")
-  (message "Reading file \"%s\" ..." filename)
-  (let ((skkbuf(find-file-noselect (expand-file-name filename)))
-       (buf (get-buffer-create "*skkdic-work*")))
-    (save-excursion
-      ;; Setup and generate the header part of working buffer.
-      (set-buffer buf)
-      (erase-buffer)
-      (buffer-disable-undo)
-      (insert ";; skkdic.el -- dictionary for Japanese input method\n"
-             ";;\tGenerated by the command `skkdic-convert'\n"
-             ";;\tDate: " (current-time-string) "\n"
-             ";;\tOriginal SKK dictionary file: "
-             (file-name-nondirectory filename)
-             "\n\n"
-             ";;; Comment:\n\n"
-             ";; Do byte-compile this file again after any modification.\n\n"
-             ";;; Start of the header of the original SKK dictionary.\n\n")
-      (set-buffer skkbuf)
-      (widen)
-      (goto-char 1)
-      (let (pos)
-       (search-forward ";; okuri-ari")
-       (forward-line 1)
-       (setq pos (point))
-       (set-buffer buf)
-       (insert-buffer-substring skkbuf 1 pos))
-      (insert "\n"
-             ";;; Code:\n\n(eval-when-compile (require 'skkdic-cnv))\n\n")
-
-      ;; Generate the body part of working buffer.
-      (set-buffer skkbuf)
-      (let ((from (point))
-           to)
-       ;; Convert okuri-ari entries.
-       (search-forward ";; okuri-nasi")
-       (beginning-of-line)
-       (setq to (point))
-       (narrow-to-region from to)
-       (skkdic-convert-okuri-ari skkbuf buf)
-       (widen)
-
-       ;; Convert okuri-nasi postfix entries.
-       (goto-char to)
-       (forward-line 1)
-       (setq from (point))
-       (re-search-forward "^\\cH")
-       (setq to (match-beginning 0))
-       (narrow-to-region from to)
-       (skkdic-convert-postfix skkbuf buf)
-       (widen)
-
-       ;; Convert okuri-nasi prefix entries.
-       (goto-char to)
-       (skkdic-convert-prefix skkbuf buf)
-
-       ;; 
-       (skkdic-collect-okuri-nasi)
-
-       ;; Convert okuri-nasi general entries.
-       (skkdic-convert-okuri-nasi skkbuf buf)
-
-       ;; Postfix
-       (save-excursion
-         (set-buffer buf)
-         (goto-char (point-max))
-         (insert ";;\n(provide 'skkdic)\n\n;; skkdic.el ends here\n")))
-
-      ;; Save the working buffer.
-      (set-buffer buf)
-      (set-visited-file-name (expand-file-name skkdic-filename dirname) t)
-      (set-buffer-file-coding-system 'iso-2022-7bit-short)
-      (save-buffer 0))
-    (kill-buffer skkbuf)
-    (switch-to-buffer buf)))
-
-(defun batch-skkdic-convert ()
-  "Run `skkdic-convert' on the files remaining on the command line.
-Use this from the command line, with `-batch';
-it won't work in an interactive Emacs.
-For example, invoke:
-  % emacs -batch -l skkdic-cnv -f batch-skkdic-convert SKK-JISYO.L
-to generate  \"skkdic.el\" from SKK dictionary file \"SKK-JISYO.L\".
-To get complete usage, invoke:
- % emacs -batch -l skkdic-cnv -f batch-skkdic-convert -h"
-  (defvar command-line-args-left)      ; Avoid compiler warning.
-  (if (not noninteractive)
-      (error "`batch-skkdic-convert' should be used only with -batch"))
-  (if (string= (car command-line-args-left) "-h")
-      (progn
-       (message "To convert SKK-JISYO.L into skkdic.el:")
-       (message "  %% emacs -batch -l skkdic-conv -f batch-skkdic-convert SKK-JISYO.L")
-       (message "To convert SKK-JISYO.L into DIR/skkdic.el:")
-       (message "  %% emacs -batch -l skkdic-conv -f batch-skkdic-convert -dir DIR SKK-JISYO.L"))
-    (let (targetdir filename)
-      (if (string= (car command-line-args-left) "-dir")
-         (progn
-           (setq command-line-args-left (cdr command-line-args-left))
-           (setq targetdir (expand-file-name (car command-line-args-left)))
-           (setq command-line-args-left (cdr command-line-args-left))))
-      (setq filename (expand-file-name (car command-line-args-left)))
-      (message "Converting %s to skkdic.el ..." filename)
-      (message "It takes around 10 minutes even on Sun SS20.")
-      (skkdic-convert filename targetdir)
-      (message "Do byte-compile the created file by:")
-      (message "  %% emacs -batch -f batch-byte-compile skkdic.el")
-      ))
-  (kill-emacs 0))
-
-
-;; The following macros are expanded at byte-compiling time so that
-;; compiled code can be loaded quickly.
-
-(defun skkdic-get-kana-compact-codes (kana)
-  (let* ((len (length kana))
-        (vec (make-vector len 0))
-        (i 0)
-        ch)
-    (while (< i len)
-      (setq ch (aref kana i))
-      (aset vec i
-           (if (< ch 128)              ; CH is an ASCII letter for OKURIGANA,
-               (- ch)                  ;  represented by a negative code.
-             (if (= ch ?\e$B!<\e(B)              ; `\e$B!<\e(B' is represented by 0.
-                 0
-               (- (nth 2 (split-char ch)) 32))))
-      (setq i (1+ i)))
-    vec))
-
-(defun skkdic-extract-conversion-data (entry)
-  (string-match "^\\cj+[a-z]* " entry)
-  (let ((kana (substring entry (match-beginning 0) (1- (match-end 0))))
-       (i (match-end 0))
-       candidates)
-    (while (string-match "[^ ]+" entry i)
-      (setq candidates (cons (match-string 0 entry) candidates))
-      (setq i (match-end 0)))
-    (cons (skkdic-get-kana-compact-codes kana) candidates)))
-
-(defmacro skkdic-set-okuri-ari (&rest entries)
-  `(defconst skkdic-okuri-ari
-     ',(let ((l entries)
-            (map '(skkdic-okuri-ari))
-            entry)
-        (while l
-          (setq entry (skkdic-extract-conversion-data (car l)))
-          (set-nested-alist (car entry) (cdr entry) map)
-          (setq l (cdr l)))
-        map)))
-
-(defmacro skkdic-set-postfix (&rest entries)
-  `(defconst skkdic-postfix
-     ',(let ((l entries)
-            (map '(nil))
-            (longest 1)
-            len entry)
-        (while l
-          (setq entry (skkdic-extract-conversion-data (car l)))
-          (setq len (length (car entry)))
-          (if (> len longest)
-              (setq longest len))
-          (let ((entry2 (lookup-nested-alist (car entry) map nil nil t)))
-            (if (consp (car entry2))
-                (let ((conversions (cdr entry)))
-                  (while conversions
-                    (if (not (member (car conversions) (car entry2)))
-                        (setcar entry2 (cons (car conversions) (car entry2))))
-                    (setq conversions (cdr conversions))))
-              (set-nested-alist (car entry) (cdr entry) map)))
-          (setq l (cdr l)))
-        (setcar map longest)
-        map)))
-
-(defmacro skkdic-set-prefix (&rest entries)
-  `(defconst skkdic-prefix
-     ',(let ((l entries)
-            (map '(nil))
-            (longest 1)
-            len entry)
-        (while l
-          (setq entry (skkdic-extract-conversion-data (car l)))
-          (setq len (length (car entry)))
-          (if (> len longest)
-              (setq longest len))
-          (let ((entry2 (lookup-nested-alist (car entry) map len nil t)))
-            (if (consp (car entry2))
-                (let ((conversions (cdr entry)))
-                  (while conversions
-                    (if (not (member (car conversions) (car entry2)))
-                        (setcar entry2 (cons (car conversions) (car entry2))))
-                    (setq conversions (cdr conversions))))
-              (set-nested-alist (car entry) (cdr entry) map len)))
-          (setq l (cdr l)))
-        (setcar map longest)
-        map)))
-
-(defmacro skkdic-set-okuri-nasi (&rest entries)
-  `(defconst skkdic-okuri-nasi
-     ',(let ((l entries)
-            (map '(skdic-okuri-nasi))
-            (count 0)
-            entry)
-        (while l
-          (setq count (1+ count))
-          (if (= (% count 10) 0)
-              (message (format "%d entries" count)))
-          (setq entry (skkdic-extract-conversion-data (car l)))
-          (set-nested-alist (car entry) (cdr entry) map)
-          (setq l (cdr l)))
-        map)))
-
-(provide 'skkdic-cnv)
-
-;; skkdic-cnv.el ends here
diff --git a/lisp/international/skkdic-utl.el b/lisp/international/skkdic-utl.el
deleted file mode 100644 (file)
index a0f622b..0000000
+++ /dev/null
@@ -1,214 +0,0 @@
-;;; skkdic-utl.el --- Utility functions for handling SKK dictionary
-
-;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
-
-;; Keywords: mule, multilingual, Japanese, SKK
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs 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.
-
-;; GNU Emacs 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:
-
-;; SKK is a free Japanese input method running on Mule created by
-;; Masahiko Sato <masahiko@sato.riec.tohoku.ac.jp>.  The Emacs Lisp
-;; library kkc.el provides a facility to convert a Japanese kana
-;; string to a kanji-kana-mixed string by using a SKK dictionary.
-;;
-;; This file provides a generic function to look up a SKK dictionary.
-;;
-;; The original SKK dictionary SKK-JISYO.L is converted to skkdic.el.
-;; We get entries of the dictionary in four variables (listed below)
-;; by loadig this file (or byte-compiled version skkdic.elc).
-
-;;; Code:
-
-;; The following four variables are set by loading skkdic.el[c].
-(defvar skkdic-okuri-ari nil
-  "Nested alist for OKURI-ARI entries of SKK dictionary.")
-
-(defvar skkdic-postfix nil
-  "Nested alist for SETSUBIJI (postfix) entries of SKK dictionary.")
-
-(defvar skkdic-prefix nil
-  "Nested alist SETTOUJI (prefix) entries of SKK dictionary.")
-
-(defvar skkdic-okuri-nasi nil
-  "Nested alist for OKURI-NASI entries of SKK dictionary.")
-
-(defconst skkdic-okurigana-table
-  '((?\e$B$!\e(B . ?a) (?\e$B$"\e(B . ?a) (?\e$B$#\e(B . ?i) (?\e$B$$\e(B . ?i) (?\e$B$%\e(B . ?u)
-    (?\e$B$&\e(B . ?u) (?\e$B$'\e(B . ?e) (?\e$B$(\e(B . ?e) (?\e$B$)\e(B . ?o) (?\e$B$*\e(B . ?o)
-    (?\e$B$+\e(B . ?k) (?\e$B$,\e(B . ?g) (?\e$B$-\e(B . ?k) (?\e$B$.\e(B . ?g) (?\e$B$/\e(B . ?k)
-    (?\e$B$0\e(B . ?g) (?\e$B$1\e(B . ?k) (?\e$B$2\e(B . ?g) (?\e$B$3\e(B . ?k) (?\e$B$4\e(B . ?g)
-    (?\e$B$5\e(B . ?s) (?\e$B$6\e(B . ?z) (?\e$B$7\e(B . ?s) (?\e$B$8\e(B . ?j) (?\e$B$9\e(B . ?s)
-    (?\e$B$:\e(B . ?z) (?\e$B$;\e(B . ?s) (?\e$B$<\e(B . ?z) (?\e$B$=\e(B . ?s) (?\e$B$>\e(B . ?z)
-    (?\e$B$?\e(B . ?t) (?\e$B$@\e(B . ?d) (?\e$B$A\e(B . ?t) (?\e$B$B\e(B . ?d) (?\e$B$C\e(B . ?t)
-    (?\e$B$D\e(B . ?t) (?\e$B$E\e(B . ?d) (?\e$B$F\e(B . ?t) (?\e$B$G\e(B . ?d) (?\e$B$H\e(B . ?t) (?\e$B$I\e(B . ?d)
-    (?\e$B$J\e(B . ?n) (?\e$B$K\e(B . ?n) (?\e$B$L\e(B . ?n) (?\e$B$M\e(B . ?n) (?\e$B$N\e(B . ?n)
-    (?\e$B$O\e(B . ?h) (?\e$B$P\e(B . ?b) (?\e$B$Q\e(B . ?p) (?\e$B$R\e(B . ?h) (?\e$B$S\e(B . ?b)
-    (?\e$B$T\e(B . ?p) (?\e$B$U\e(B . ?h) (?\e$B$V\e(B . ?b) (?\e$B$W\e(B . ?p) (?\e$B$X\e(B . ?h)
-    (?\e$B$Y\e(B . ?b) (?\e$B$Z\e(B . ?p) (?\e$B$[\e(B . ?h) (?\e$B$\\e(B . ?b) (?\e$B$]\e(B . ?p)
-    (?\e$B$^\e(B . ?m) (?\e$B$_\e(B . ?m) (?\e$B$`\e(B . ?m) (?\e$B$a\e(B . ?m) (?\e$B$b\e(B . ?m)
-    (?\e$B$c\e(B . ?y) (?\e$B$d\e(B . ?y) (?\e$B$e\e(B . ?y) (?\e$B$f\e(B . ?y) (?\e$B$g\e(B . ?y) (?\e$B$h\e(B . ?y)
-    (?\e$B$i\e(B . ?r) (?\e$B$j\e(B . ?r) (?\e$B$k\e(B . ?r) (?\e$B$l\e(B . ?r) (?\e$B$m\e(B . ?r)
-    (?\e$B$o\e(B . ?w) (?\e$B$p\e(B . ?w) (?\e$B$q\e(B . ?w) (?\e$B$r\e(B . ?w)
-    (?\e$B$s\e(B . ?n)
-    )
-  "Alist of Okuriganas vs trailing ASCII letters in OKURI-ARI entry.")
-
-(defun skkdic-merge-head-and-tail (heads tails postfix)
-  (let ((min-len 2)
-       l)
-    (while heads
-      (if (or (not postfix)
-             (>= (length (car heads)) min-len))
-         (let ((tail tails))
-           (while tail
-             (if (or postfix
-                     (>= (length (car tail)) min-len))
-                 (setq l (cons (concat (car heads) (car tail)) l)))
-             (setq tail (cdr tail)))))
-      (setq heads (cdr heads)))
-    l))
-
-(defconst skkdic-jisx0208-hiragana-block (nth 1 (split-char ?\e$B$"\e(B)))
-
-(defun skkdic-lookup-key (seq len &optional postfix prefer-noun)
-  "Return a list of conversion string for sequence SEQ of length LEN.
-
-SEQ is a vector of Kana characters to be converted by SKK dictionary.
-If LEN is shorter than the length of KEYSEQ, the first LEN keys in SEQ
-are took into account.
-
-Optional 3rd arg POSTFIX non-nil means SETSUBIJI (postfix) are also
-considered to find conversion strings.
-
-Optional 4th arg PREFER-NOUN non-nil means that the conversions
-without okurigana are placed at the head of the returned list."
-  (or skkdic-okuri-nasi
-      (condition-case err
-         (load-library "skk/skkdic")
-       (error (ding)
-              (with-output-to-temp-buffer "*Help*"
-                (princ "The library `skkdic' can't be loaded.
-
-The most common case is that you have not yet installed the library
-included in LEIM (Libraries of Emacs Input Method) which is
-distributed separately from Emacs.
-
-LEIM is available from the same ftp directory as Emacs."))
-              (signal (car err) (cdr err)))))
-
-  (let ((vec (make-vector len 0))
-       (i 0)
-       entry)
-    ;; At first, generate vector VEC from SEQ for looking up SKK
-    ;; alists.  Nth element in VEC corresponds to Nth element in SEQ.
-    ;; The values are decided as follows.
-    ;;   If SEQ[N] is `\e$B!<\e(B', VEC[N] is 0,
-    ;;   else if SEQ[N] is a Hiragana character, VEC[N] is:
-    ;;     ((The 2nd position code of SEQ[N]) - 32),
-    ;;   else VEC[N] is 128.
-    (while (< i len)
-      (let ((ch (aref seq i))
-           elts)
-       (if (= ch ?\e$B!<\e(B)
-           (aset vec i 0)
-         (setq elts (split-char ch))
-         (if (and (eq (car elts) 'japanese-jisx0208)
-                  (= (nth 1 elts) skkdic-jisx0208-hiragana-block))
-             (aset vec i (- (nth 2 elts) 32))
-           (aset vec i 128))))
-      (setq i (1+ i)))
-
-    ;; Search OKURI-NASI entries.
-    (setq entry (lookup-nested-alist vec skkdic-okuri-nasi len 0 t))
-    (if (consp (car entry))
-       (setq entry (copy-sequence (car entry)))
-      (setq entry nil))
-
-    (if postfix
-       ;; Search OKURI-NASI entries with postfixes.
-       (let ((break (max (- len (car skkdic-postfix)) 1))
-             entry-head entry-postfix entry2)
-         (while (< break len)
-           (if (and (setq entry-head
-                          (lookup-nested-alist vec skkdic-okuri-nasi
-                                               break 0 t))
-                    (consp (car entry-head))
-                    (setq entry-postfix
-                          (lookup-nested-alist vec skkdic-postfix
-                                               len break t))
-                    (consp (car entry-postfix))
-                    (setq entry2 (skkdic-merge-head-and-tail
-                                  (car entry-head) (car entry-postfix) t)))
-               (if entry
-                   (nconc entry entry2)
-                 (setq entry entry2)))
-           (setq break (1+ break)))))
-
-    ;; Search OKURI-NASI entries with prefixes.
-    (let ((break (min (car skkdic-prefix) (- len 2)))
-         entry-prefix entry-tail entry2)
-      (while (> break 0)
-       (if (and (setq entry-prefix
-                      (lookup-nested-alist vec skkdic-prefix break 0 t))
-                (consp (car entry-prefix))
-                (setq entry-tail
-                      (lookup-nested-alist vec skkdic-okuri-nasi len break t))
-                (consp (car entry-tail))
-                (setq entry2 (skkdic-merge-head-and-tail
-                              (car entry-prefix) (car entry-tail) nil)))
-           (progn
-             (if entry
-                 (nconc entry entry2)
-               (setq entry entry2))))
-       (setq break (1- break))))
-
-    ;; Search OKURI-ARI entries.
-    (let ((okurigana (assq (aref seq (1- len)) skkdic-okurigana-table))
-         orig-element entry2)
-      (if okurigana
-         (progn
-           (setq orig-element (aref vec (1- len)))
-           (aset vec (1- len) (- (cdr okurigana)))
-           (if (and (setq entry2 (lookup-nested-alist vec skkdic-okuri-ari
-                                                      len 0 t))
-                    (consp (car entry2)))
-               (progn
-                 (setq entry2 (copy-sequence (car entry2)))
-                 (let ((l entry2)
-                       (okuri (char-to-string (aref seq (1- len)))))
-                   (while l
-                     (setcar l (concat (car l) okuri))
-                     (setq l (cdr l)))
-                   (if entry
-                       (if prefer-noun
-                           (nconc entry entry2)
-                         (setq entry2 (nreverse entry2))
-                         (nconc entry2 entry)
-                         (setq entry entry2))
-                     (setq entry (nreverse entry2))))))
-           (aset vec (1- len) orig-element))))
-
-    entry))
-
-;;
-(provide 'skkdic-utl)
-
-;; skkdic-utl.el ends here