;;; ja-dic-cnv.el --- convert a Japanese dictionary (SKK-JISYO.L) to Emacs Lisp
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007
+;; 2005, 2006, 2007, 2008
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
;; 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)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
(defvar ja-dic-filename "ja-dic.el")
;; To make a generated ja-dic.el smaller.
-(make-coding-system
- 'iso-2022-7bit-short
- 2 ?J
+(define-coding-system 'iso-2022-7bit-short
"Like `iso-2022-7bit' but no ASCII designation before SPC."
- '(ascii nil nil nil t t nil t)
- '((safe-charsets . t)))
+ :coding-type 'iso-2022
+ :mnemonic ?J
+ :charset-list 'iso-2022
+ :designation [(ascii t) nil nil nil]
+ :flags '(short 7-bit designation))
(defun skkdic-convert-okuri-ari (skkbuf buf)
(message "Processing OKURI-ARI entries ...")
;; 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.
+;; is visited, KANA is the current entry for STR. FIRST is t only if
+;; this is called at top level.
(defun skkdic-breakup-string (skkbuf kana str from to &optional first)
(let ((len (- to from)))
(- 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))))
+ (- (logand (encode-char ch 'japanese-jisx0208) #xFF) 32))))
(setq i (1+ i)))
vec))
(while l
(setq count (1+ count))
(if (= (% count 10000) 0)
- (message (format "%d entries" count)))
+ (message "%d entries" count))
(setq entry (skkdic-extract-conversion-data (car l)))
(set-nested-alist (car entry) (cdr entry) map)
(setq l (cdr l)))
;; coding: iso-2022-7bit
;; End:
-;;; arch-tag: dec06fb0-8118-45b1-80d7-dc360b6fd3b2
+;; arch-tag: dec06fb0-8118-45b1-80d7-dc360b6fd3b2
;;; ja-dic-cnv.el ends here