X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Futf-2000%2Fchar-db-util.el;h=b3b5e081d159dcd0a81dc63de05a082a6103217d;hb=2ddc889ec52b80578fddbc2cd7e56db9861644aa;hp=3add8f94561263ed945e601a72ae48c13b1e5166;hpb=3a22dcb3b6189c92c4a6841585f8bd1fea3f37d8;p=chise%2Fxemacs-chise.git diff --git a/lisp/utf-2000/char-db-util.el b/lisp/utf-2000/char-db-util.el index 3add8f9..b3b5e08 100644 --- a/lisp/utf-2000/char-db-util.el +++ b/lisp/utf-2000/char-db-util.el @@ -115,7 +115,8 @@ (defun insert-char-data (char) (let ((data (char-attribute-alist char)) - cell ret has-long-ccs-name rest) + cell ret has-long-ccs-name rest + radical strokes) (when data (save-restriction (narrow-to-region (point)(point)) @@ -240,28 +241,68 @@ (mapconcat (function prin1-to-string) cell " "))) (setq data (del-alist 'morohashi-daikanwa data)) ) + (setq radical nil) (when (setq cell (assq 'ideographic-radical data)) - (setq cell (cdr cell)) + (setq radical (cdr cell)) (insert (format "(ideographic-radical . %S)\t; %c " + radical + (aref ideographic-radicals radical))) + (setq data (del-alist 'ideographic-radical data)) + ) + (when (setq cell (assq 'kangxi-radical data)) + (setq cell (cdr cell)) + (unless (eq cell radical) + (insert (format "(kangxi-radical . %S)\t; %c + " + cell + (aref ideographic-radicals cell))) + (setq radical cell)) + (setq data (del-alist 'kangxi-radical data)) + ) + (when (setq cell (assq 'japanese-radical data)) + (setq cell (cdr cell)) + (unless (eq cell radical) + (insert (format "(japanese-radical . %S)\t; %c + " + cell + (aref ideographic-radicals cell))) + (setq radical cell)) + (setq data (del-alist 'japanese-radical data)) + ) + (when (setq cell (assq 'cns-radical data)) + (setq cell (cdr cell)) + (insert (format "(cns-radical\t . %S)\t; %c + " cell (aref ideographic-radicals cell))) - (setq data (del-alist 'ideographic-radical data)) + (setq data (del-alist 'cns-radical data)) ) + (setq strokes nil) (cond ((setq cell (assq 'ideographic-strokes data)) - (setq cell (cdr cell)) + (setq strokes (cdr cell)) (insert (format "(ideographic-strokes . %S) " - cell)) + strokes)) (setq data (del-alist 'ideographic-strokes data)) + (when (setq cell (assq 'japanese-strokes data)) + (setq cell (cdr cell)) + (unless (eq cell strokes) + (insert (format "(japanese-strokes\t . %S) + " + cell)) + (setq strokes cell)) + (setq data (del-alist 'japanese-strokes data)) + ) (when (setq cell (assq 'total-strokes data)) (setq cell (cdr cell)) (insert (format "(total-strokes\t . %S) " cell)) (setq data (del-alist 'total-strokes data)) - )) + ) + ) ((setq cell (assq 'total-strokes data)) (setq cell (cdr cell)) (insert (format "(total-strokes\t. %S) @@ -405,10 +446,15 @@ (when (find-charset (car cdef)) (goto-char (match-end 0)) (setq char - (if (or (memq (car cdef) '(ascii latin-viscii-upper - latin-viscii-lower - arabic-iso8859-6)) - (= (char-int (charset-iso-final-char (car cdef))) 0)) + (if (and + (not (eq (car cdef) 'ideograph-daikanwa)) + (or (memq (car cdef) '(ascii latin-viscii-upper + latin-viscii-lower + arabic-iso8859-6 + japanese-jisx0213-1 + japanese-jisx0213-2)) + (= (char-int (charset-iso-final-char (car cdef))) + 0))) (apply (function make-char) cdef) (if (setq table (charset-mapping-table (car cdef))) (set-charset-mapping-table (car cdef) nil))