(let ((chars
(sort (copy-list (aref ideograph-radical-chars-vector radical))
(function ideograph-char<)))
- (attributes (sort (char-attribute-list) #'char-attribute-name<))
- (ccs (sort (charset-list) #'char-attribute-name<)))
+ attributes ccs)
+ (dolist (name (char-attribute-list))
+ (if (find-charset name)
+ (push name ccs)
+ (push name attributes)))
+ (setq attributes (sort attributes #'char-attribute-name<)
+ ccs (sort ccs #'char-attribute-name<))
(aset ideograph-radical-chars-vector radical chars)
(while chars
(insert-char-data (car chars) nil attributes ccs)
(write-region (point-min)(point-max) file)
)))
+;;;###autoload
+(defun ideographic-structure-find-char (structure)
+ (let (rest)
+ (map-char-attribute (lambda (char value)
+ (setq rest structure)
+ (catch 'tag
+ (while (and rest value)
+ (unless (char-ref= (car rest)(car value))
+ (throw 'tag nil))
+ (setq rest (cdr rest)
+ value (cdr value)))
+ (unless (or rest value)
+ char)))
+ 'ideographic-structure)))
+
(provide 'ideograph-util)
;;; ideograph-util.el ends here