From 1ea4d8db9106a34acdd073f56f38f13fcd13c596 Mon Sep 17 00:00:00 2001 From: tomo Date: Fri, 5 Apr 2002 11:30:21 +0000 Subject: [PATCH] (ids-format-unit): New function. (ids-format-list): New function. --- ids.el | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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. ;;; -- 1.7.10.4