X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Futf-2000%2Fread-maps.el;h=54f27e42f304a6d2836c266198bdd812c3b4db51;hb=94332612377df1a1e54f7ba872f55a93e52b2d6b;hp=e1926f8e9aba5ef3f0b9e80e213d893376feb599;hpb=f1a0f6352b8fd7e6fb45896d2cabf809ef5705fe;p=chise%2Fxemacs-chise.git- diff --git a/lisp/utf-2000/read-maps.el b/lisp/utf-2000/read-maps.el index e1926f8..54f27e4 100644 --- a/lisp/utf-2000/read-maps.el +++ b/lisp/utf-2000/read-maps.el @@ -1,6 +1,6 @@ ;;; read-maps.el --- Read mapping-tables. -;; Copyright (C) 2002,2003 MORIOKA Tomohiko +;; Copyright (C) 2002,2003,2004 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko ;; Keywords: mapping table, character, CCS, multiscript, multilingual @@ -126,7 +126,7 @@ (put-char-attribute chr ccs code)) (when (and ucs-code (not (eq (or (encode-char chr ucs-ccs 'defined-only) - (get-char-attribute chr '=>ucs)) + (char-feature chr '=>ucs)) ucs-code))) (put-char-attribute chr ucs-ccs ucs-code)) (when (and ucs @@ -134,9 +134,9 @@ (and (not (memq ucs-ccs '(ucs-jis =ucs-jis-1990 =ucs-jis-2000 - ;; ucs-big5 + ;; ucs-big5 ))) - (get-char-attribute chr '=>ucs))) + (char-feature chr '=>ucs))) ucs))) (if (or ucs-code (null ucs-ccs)) (put-char-attribute chr '=>ucs ucs) @@ -145,6 +145,36 @@ (put-char-attribute chr ucs-ccs ucs))))) (forward-line))))) +(defun jp-jouyou-read-file (filename) + (interactive "fjp-jouyou file : ") + (with-temp-buffer + (buffer-disable-undo) + (insert-file-contents filename) + (goto-char (point-min)) + (let (char tchars) + (while (re-search-forward "^[^\t\n ]+\t\\(.\\)\t*" nil t) + (setq char (aref (match-string 1) 0) + tchars (buffer-substring (match-end 0) + (point-at-eol))) + (when (> (length tchars) 0) + (setq tchars + (mapcar (lambda (c) + (aref c 0)) + (split-string tchars " "))) + (unless (equal (char-feature char '<-simplified@JP/Jouyou) + tchars) + (put-char-attribute char + '<-simplified@JP/Jouyou + tchars))) + ;; (put-char-attribute + ;; char 'script (adjoin + ;; 'JP + ;; (adjoin + ;; 'Jouyou + ;; (adjoin + ;; 'Ideograph + ;; (get-char-attribute char 'script))))) + )))) (provide 'read-maps)