From: MORIOKA Tomohiko Date: Wed, 18 Jun 2014 12:56:49 +0000 (+0900) Subject: (www-display-object-desc): Add new argument `uri-feature-name'; if it X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=b51f59a45c63ff95a0773b5b51d1751f6759788d;p=chise%2Fest.git (www-display-object-desc): Add new argument `uri-feature-name'; if it is specified, display only the specified feature with all items of the value. (www-batch-view): Modify for `www-display-object-desc'. --- diff --git a/cwiki-view.el b/cwiki-view.el index 75d32ec..9fc844f 100644 --- a/cwiki-view.el +++ b/cwiki-view.el @@ -42,12 +42,14 @@ size=\"64\" maxlength=\"256\" value=\"%s\"> ""))) ) -(defun www-display-object-desc (genre uri-object &optional lang level simple +(defun www-display-object-desc (genre uri-object &optional uri-feature-name + lang level simple uri-feature-name-to-edit editing-format) (unless level (setq level 0)) (let ((object (www-uri-decode-object genre uri-object)) - feature-name-to-edit + (est-eval-list-feature-items-limit est-eval-list-feature-items-limit) + feature-name-to-display feature-name-to-edit base-name-to-edit metadata-name-to-edit without-header logical-feature chise-wiki-displayed-features @@ -122,10 +124,15 @@ size=\"64\" maxlength=\"256\" value=\"%s\"> (www-format-feature-name '->subsumptive lang)))) (when (eq genre 'character) (setq GlyphWiki-id (char-GlyphWiki-id object))) + (setq ret (www-format-encode-string + (est-format-object object 'readable))) (princ (format "%s%s\n" level - (www-format-encode-string - (est-format-object object 'readable)) + (if uri-feature-name + (format "%s" + (www-uri-make-object-url object uri-object) + ret) + ret) (if GlyphWiki-id (format " \"%s\"" @@ -146,9 +153,20 @@ size=\"30\" maxlength=\"30\" value=\"%s\">)

(decode-uri-string uri-object 'utf-8-mcs-er)) 'utf-8-mcs-er))) (setq object-spec - (if (eq genre 'character) - (char-attribute-alist object) - (concord-object-spec object))) + (cond + (uri-feature-name + (setq feature-name-to-display + (www-uri-decode-feature-name uri-feature-name)) + (setq est-eval-list-feature-items-limit nil) + (list + (cons feature-name-to-display + (if (eq genre 'character) + (get-char-attribute object feature-name-to-display) + (concord-object-get object feature-name-to-display))))) + (t + (if (eq genre 'character) + (char-attribute-alist object) + (concord-object-spec object))))) (when feature-name-to-edit (unless (assq base-name-to-edit object-spec) (setq object-spec (cons (cons base-name-to-edit nil) @@ -440,8 +458,7 @@ size=\"30\" maxlength=\"30\" value=\"%s\" />" (setq ret (car target)) (cond ((eq (car ret) 'char) (www-display-object-desc - 'character - (cdr ret) + 'character (cdr ret) (cdr (assq 'feature target)) lang nil (eq mode 'simple)) ) @@ -455,8 +472,7 @@ size=\"30\" maxlength=\"30\" value=\"%s\" />" ) (t (www-display-object-desc - (car ret) - (cdr ret) + (car ret) (cdr ret) (cdr (assq 'feature target)) lang nil (eq mode 'simple)) ))