From c77f3a51f89e45b281487a4907a3f11705867b49 Mon Sep 17 00:00:00 2001 From: tomo Date: Wed, 22 Dec 1999 19:46:07 +0000 Subject: [PATCH] (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. --- lisp/utf-2000/char-db-util.el | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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)) -- 1.7.10.4