From: tomo Date: Sat, 3 Nov 2001 06:32:08 +0000 (+0000) Subject: (ideographic-structure-find-char): New function. X-Git-Tag: r21-2-41-utf-2000-0_18-1~64 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ed2f1aaada8bbf0a3f52ba159187b943590b604d;p=chise%2Fxemacs-chise.git- (ideographic-structure-find-char): New function. --- diff --git a/lisp/utf-2000/ideograph-util.el b/lisp/utf-2000/ideograph-util.el index 5cd7fda..562485b 100644 --- a/lisp/utf-2000/ideograph-util.el +++ b/lisp/utf-2000/ideograph-util.el @@ -232,6 +232,21 @@ (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