From: tomo Date: Wed, 22 Dec 1999 19:46:07 +0000 (+0000) Subject: (insert-char-data): Change order of `kangxi-strokes'. X-Git-Tag: r21-2-19-utf-2000-0_13-0~19 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=c77f3a51f89e45b281487a4907a3f11705867b49;p=chise%2Fxemacs-chise.git (insert-char-data): Change order of `kangxi-strokes'. (insert-char-data-with-variant): Look up variants of corresponding ucs character if a character does not have variants. --- diff --git a/lisp/utf-2000/char-db-util.el b/lisp/utf-2000/char-db-util.el index b3b5e08..4329441 100644 --- a/lisp/utf-2000/char-db-util.el +++ b/lisp/utf-2000/char-db-util.el @@ -253,7 +253,7 @@ (when (setq cell (assq 'kangxi-radical data)) (setq cell (cdr cell)) (unless (eq cell radical) - (insert (format "(kangxi-radical . %S)\t; %c + (insert (format "(kangxi-radical\t . %S)\t; %c " cell (aref ideographic-radicals cell))) @@ -286,6 +286,15 @@ " strokes)) (setq data (del-alist 'ideographic-strokes data)) + (when (setq cell (assq 'kangxi-strokes data)) + (setq cell (cdr cell)) + (unless (eq cell strokes) + (insert (format "(kangxi-strokes\t . %S) + " + cell)) + (setq strokes cell)) + (setq data (del-alist 'kangxi-strokes data)) + ) (when (setq cell (assq 'japanese-strokes data)) (setq cell (cdr cell)) (unless (eq cell strokes) @@ -471,7 +480,10 @@ (defun insert-char-data-with-variant (char) (insert-char-data char) - (let ((variants (char-variants char))) + (let ((variants (or (char-variants char) + (let ((ucs (get-char-attribute char '->ucs))) + (if ucs + (delete char (char-variants (int-char ucs)))))))) (while variants (insert-char-data (car variants)) (setq variants (cdr variants))