From: tomo Date: Wed, 2 Feb 2005 11:18:18 +0000 (+0000) Subject: (insert-char-data-with-variant): Don't refer `->ucs'; fix problem X-Git-Tag: r21-4-15-chise-0_21-33^2~53 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=5c22d12f2ec334ecf96e641fc87fc73e1dd8f145;p=chise%2Fxemacs-chise.git (insert-char-data-with-variant): Don't refer `->ucs'; fix problem about cyclic relations. --- diff --git a/lisp/utf-2000/char-db-util.el b/lisp/utf-2000/char-db-util.el index 66d3995..3ee5dbd 100644 --- a/lisp/utf-2000/char-db-util.el +++ b/lisp/utf-2000/char-db-util.el @@ -1,6 +1,6 @@ ;;; char-db-util.el --- Character Database utility -;; Copyright (C) 1998,1999,2000,2001,2002,2003,2004 MORIOKA Tomohiko. +;; Copyright (C) 1998,1999,2000,2001,2002,2003,2004,2005 MORIOKA Tomohiko. ;; Author: MORIOKA Tomohiko ;; Keywords: CHISE, Character Database, ISO/IEC 10646, Unicode, UCS-4, MULE. @@ -1109,14 +1109,14 @@ no-ucs-unified script excluded-script) (insert-char-data char printable) - (let ((variants (or (char-variants char) - (let ((ucs (get-char-attribute char '->ucs))) - (if ucs - (delete char (char-variants (int-char ucs))))))) + (let ((variants (char-variants char)) + rest variant vs ret) (setq variants (sort variants #'<)) - (while variants - (setq variant (car variants)) + (setq rest variants) + (setq variants (cons char variants)) + (while rest + (setq variant (car rest)) (unless (get-char-attribute variant '<-subsumptive) (if (and (or (null script) (null (setq vs (get-char-attribute variant 'script))) @@ -1130,9 +1130,9 @@ (while ret (or (memq (car ret) variants) ;; (get-char-attribute (car ret) '<-subsumptive) - (setq variants (append variants (list (car ret))))) + (setq rest (nconc rest (list (car ret))))) (setq ret (cdr ret))))))) - (setq variants (cdr variants))))) + (setq rest (cdr rest))))) (defun insert-char-range-data (min max &optional script excluded-script) (let ((code min)