From 9f34078d48b75b2ea00f56cf09d45ba6b0de5de5 Mon Sep 17 00:00:00 2001 From: tomo Date: Fri, 26 May 2000 08:47:20 +0000 Subject: [PATCH] (update-ideograph-radical-table): Ignore non `Ideograph' characters. --- lisp/utf-2000/ideograph-util.el | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/lisp/utf-2000/ideograph-util.el b/lisp/utf-2000/ideograph-util.el index 20fc9e9..cf1a523 100644 --- a/lisp/utf-2000/ideograph-util.el +++ b/lisp/utf-2000/ideograph-util.el @@ -1,8 +1,8 @@ ;;; ideograph-util.el --- Ideographic Character Database utility -;; Copyright (C) 1999 MORIOKA Tomohiko. +;; Copyright (C) 1999,2000 MORIOKA Tomohiko. -;; Author: MORIOKA Tomohiko +;; Author: MORIOKA Tomohiko ;; Keywords: UTF-2000, ISO/IEC 10646, Unicode, UCS-4, MULE. ;; This file is part of UTF-2000. @@ -75,10 +75,12 @@ chinese-isoir165 chinese-big5-1 chinese-big5-2)) - ret) + ret script) (while (<= i #x9FFF) - (setq char (int-char i)) - (when (setq radical (char-ideograph-radical char)) + (setq char (decode-char 'ucs i)) + (when (and (or (null (setq script (get-char-attribute char 'script))) + (memq 'Ideograph script)) + (setq radical (char-ideograph-radical char))) (or (get-char-attribute char 'ucs) (put-char-attribute char 'ucs i)) (if (not (memq char @@ -89,8 +91,10 @@ (setq i (1+ i))) (setq i #x100000) (while (<= i #x10FFFF) - (setq char (int-char i)) - (when (setq radical (char-ideograph-radical char)) + (setq char (decode-char 'ucs i)) + (when (and (or (null (setq script (get-char-attribute char 'script))) + (memq 'Ideograph script)) + (setq radical (char-ideograph-radical char))) (if (not (memq char (setq ret (aref ideograph-radical-chars-vector radical)))) @@ -117,7 +121,9 @@ (setq j 33) (while (< j 127) (setq char (make-char (car charsets) i j)) - (if (and (setq radical (char-ideograph-radical char)) + (if (and (or (null (setq script (get-char-attribute char 'script))) + (memq 'Ideograph script)) + (setq radical (char-ideograph-radical char)) (not (memq char (setq ret (aref ideograph-radical-chars-vector -- 1.7.10.4