From d4ebdfbe53336a396de69d79377076c8ab78d172 Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Fri, 3 Jun 2011 09:50:41 +0900 Subject: [PATCH] (est-eval-value-default): Support `omitted' tag. (est-eval-feature-value): Use `omitted' tag when length of value is more than 128. (est-eval-unit): Support `omitted' tag. --- est-eval.el | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/est-eval.el b/est-eval.el index 91b91f2..7bf4482 100644 --- a/est-eval.el +++ b/est-eval.el @@ -9,12 +9,14 @@ (defun est-eval-value-default (value) (if (listp value) - (list* 'list - '(:separator " ") - (mapcar - (lambda (unit) - (format "%S" unit)) - value)) + (if (eq (car value) 'omitted) + value + (list* 'list + '(:separator " ") + (mapcar + (lambda (unit) + (format "%S" unit)) + value))) (est-eval-value-as-S-exp value))) (defun est-eval-value-as-object (value) @@ -275,6 +277,15 @@ (setq value (www-get-feature-value object feature-name))) (unless format (setq format (www-feature-value-format feature-name))) + (if (consp value) + (let ((ret (condition-case nil + (nthcdr 127 value) + (error nil nil)))) + (when ret + (setcdr ret + (list (list 'omitted + (list :object object :feature feature-name) + "...")))))) (cond ((symbolp format) (est-eval-apply-value object feature-name @@ -369,6 +380,11 @@ (format "@%s" domain) "")) ) + ((eq (car exp) 'omitted) + (list 'omitted + (list :object object :feature feature-name) + "...") + ) ((eq (car exp) 'prev-char) (list 'prev-char (list :object object :feature feature-name) -- 1.7.10.4