From: tomo Date: Sun, 21 Nov 1999 08:38:20 +0000 (+0000) Subject: (insert-char-data): Ignore `kangxi-radical' and `japanese-radical' if X-Git-Tag: r21-2-19-utf-2000-0_13-0~114 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=3bdfb8665208cf835f055d102f7f0796922488fd;p=chise%2Fxemacs-chise.git- (insert-char-data): Ignore `kangxi-radical' and `japanese-radical' if they have the same value of `ideographic-radical'; ignore `japanese-strokes' if it has the same value of `ideographic-strokes'. --- diff --git a/lisp/utf-2000/char-db-util.el b/lisp/utf-2000/char-db-util.el index 94e2a3b..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,14 +241,35 @@ (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 " - cell - (aref ideographic-radicals cell))) + 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 @@ -256,20 +278,31 @@ (aref ideographic-radicals cell))) (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)