From: tomo Date: Fri, 5 Apr 2002 11:30:21 +0000 (+0000) Subject: (ids-format-unit): New function. X-Git-Tag: chise-base-0_23~87 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=1ea4d8db9106a34acdd073f56f38f13fcd13c596;p=chise%2Ftomoyo-tools.git (ids-format-unit): New function. (ids-format-list): New function. --- diff --git a/ids.el b/ids.el index da4101e..9948d39 100644 --- a/ids.el +++ b/ids.el @@ -96,6 +96,25 @@ (if (= (length (cdr ret)) 0) (car ret)))) +(defun ids-format-unit (ids-char) + (let (ret) + (cond ((characterp ids-char) + (char-to-string ids-char)) + ((integerp ids-char) + (char-to-string (decode-char 'ucs ids-char))) + ((setq ret (find-char ids-char)) + (char-to-string ret)) + ((setq ret (assq 'ideographic-structure ids-char)) + (ids-format-list (cdr ret)))))) + +(defun ids-format-list (ids-list) + (mapconcat (lambda (cell) + (ids-format-unit + (if (char-ref-p cell) + (plist-get cell :char) + cell))) + ids-list "")) + ;;; @ End. ;;;