(error (format "%s" value)))
(format "%s" value)))
+(defun est-eval-value-as-composition-list (value &optional separator subtype)
+ (if (and (listp value)
+ (listp (cdr value)))
+ (condition-case nil
+ (let (props)
+ (if separator
+ (setq props (list :separator separator)))
+ (if subtype
+ (setq props (list* :subtype subtype props)))
+ (list* 'list props
+ (mapcar
+ (lambda (cell)
+ (list 'list nil
+ "+ "
+ (list 'object (list :object (car cell))
+ (format "U+%04X" (car cell)))
+ " : "
+ (est-eval-value-as-object (cdr cell))))
+ (sort value
+ (lambda (a b)
+ (< (car a)(car b)))))))
+ (error (format "%s" value)))
+ (format "%s" value)))
+
+(defun est-eval-value-as-decomposition-list (value)
+ (if (and (listp value)
+ (listp (cdr value)))
+ (condition-case nil
+ (let (props)
+ (list* 'list props
+ (mapconcat #'char-to-string value "")
+ (list
+ " ("
+ (list* 'list '(:separator " + ")
+ (mapcar
+ (lambda (chr)
+ (list 'object (list :object chr)
+ (format "U+%04X" chr)))
+ value))
+ ")")))
+ (error (format "%s" value)))
+ (format "%s" value)))
+
(defun est-eval-value-as-ids (value)
(if (listp value)
(list 'ids nil (ideographic-structure-to-ids value))
(est-eval-value-as-kangxi-radical value))
((eq format 'ids)
(est-eval-value-as-ids value))
+ ((eq format 'decomposition)
+ (est-eval-value-as-decomposition-list value))
+ ((eq format 'composition)
+ (est-eval-value-as-composition-list value))
((or (eq format 'space-separated)
(eq format 'space-separated-char-list))
(est-eval-value-as-object-list value " "))
((eq format 'unordered-list)
(est-eval-value-as-object-list value nil 'unordered-list))
+ ((eq format 'unordered-composition-list)
+ (est-eval-value-as-composition-list value nil 'unordered-list))
((eq format 'space-separated-ids)
(est-eval-value-as-space-separated-ids value))
((eq format 'space-separated-domain-list)