From: tomo Date: Sat, 13 Nov 1999 15:27:17 +0000 (+0000) Subject: (char-attribute-name<): New function. X-Git-Tag: r21-2-19-utf-2000-0_12-0~90 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=0ebcaf2b5d0ded3654e56f6e5099d1a64e11493d;p=chise%2Fxemacs-chise.git (char-attribute-name<): New function. (insert-char-data): Use `char-attribute-name<' to sort; change order of `iso-10646-comment'. (char-db-update-comment): Use mapping-table for `latin-viscii-*'. --- diff --git a/lisp/utf-2000/char-db-util.el b/lisp/utf-2000/char-db-util.el index 75a9326..4501ebc 100644 --- a/lisp/utf-2000/char-db-util.el +++ b/lisp/utf-2000/char-db-util.el @@ -61,6 +61,45 @@ ("So" symbol other) )) +(defun char-attribute-name< (ka kb) + (cond + ((find-charset ka) + (cond + ((find-charset kb) + (cond + ((= (charset-dimension ka) + (charset-dimension kb)) + (cond ((= (charset-chars ka)(charset-chars kb)) + (cond + ((>= (charset-final ka) ?@) + (if (>= (charset-final kb) ?@) + (< (charset-final ka) + (charset-final kb)) + t)) + ((>= (charset-final ka) ?0) + (cond + ((>= (charset-final kb) ?@) + nil) + ((>= (charset-final kb) ?0) + (< (charset-final ka) + (charset-final kb))) + (t))))) + ((<= (charset-chars ka)(charset-chars kb))))) + (t + (< (charset-dimension ka) + (charset-dimension kb)) + ))) + (t))) + ((find-charset kb) + t) + ((symbolp ka) + (cond ((symbolp kb) + (string< (symbol-name ka) + (symbol-name kb))) + (t))) + ((symbolp kb) + nil))) + (defun insert-char-data (char) (let ((data (char-attribute-alist char)) cell ret name has-long-ccs-name rest) @@ -158,6 +197,13 @@ (setq data (del-alist 'numeric-value data)) ) ) + (when (setq cell (assq 'iso-10646-comment data)) + (setq cell (cdr cell)) + (insert (format "(iso-10646-comment\t . %S) + " + cell)) + (setq data (del-alist 'iso-10646-comment data)) + ) (when (setq cell (assq '->decomposition data)) (setq cell (cdr cell)) (insert (format "(->decomposition\t%s) @@ -217,40 +263,7 @@ (setq data (sort data (lambda (a b) - (let ((ka (car a)) - (kb (car b))) - (cond ((find-charset ka) - (cond ((find-charset kb) - (cond ((= (charset-dimension ka) - (charset-dimension kb)) - (cond - ((>= (charset-final ka) ?@) - (if (>= (charset-final kb) ?@) - (< (charset-final ka) - (charset-final kb)) - t)) - ((>= (charset-final ka) ?0) - (cond - ((>= (charset-final kb) ?@) - nil) - ((>= (charset-final kb) ?0) - (< (charset-final ka) - (charset-final kb))) - (t))))) - (t - (< (charset-dimension ka) - (charset-dimension kb)) - ))) - (t))) - ((find-charset kb) - t) - ((symbolp ka) - (cond ((symbolp kb) - (string< (symbol-name ka) - (symbol-name kb))) - (t))) - ((symbolp kb) - nil)))))) + (char-attribute-name< (car a)(car b))))) (setq rest data) (while (and rest (progn @@ -339,7 +352,8 @@ (when (find-charset (car cdef)) (goto-char (match-end 0)) (setq char - (if (or (eq (car cdef) 'ascii) + (if (or (memq (car cdef) '(ascii latin-viscii-upper + latin-viscii-lower)) (= (char-int (charset-final (car cdef))) 0)) (apply (function make-char) cdef) (if (setq table (charset-mapping-table (car cdef)))