From 41c6a9ab82c2142be738288dbff0be69e9ed191f Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Thu, 9 Dec 2010 14:29:33 +0900 Subject: [PATCH] (www-edit-display-object-desc): Support non-character objects. (www-edit-display-feature-desc): Add new optional argument `object-genre'. (www-batch-edit): Fix problem to edit feature of non-character objects. --- cwiki-edit.el | 47 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/cwiki-edit.el b/cwiki-edit.el index 7b8c506..a8d81a0 100644 --- a/cwiki-edit.el +++ b/cwiki-edit.el @@ -69,28 +69,46 @@ size=\"64\" maxlength=\"256\" value=\"%s\"> (let ((object (www-uri-decode-object genre uri-object)) (feature-name (www-uri-decode-feature-name uri-feature-name)) base-name metadata-name + parents object-spec str) - (when (characterp object) + (when object (princ - (format " -CHISE-wiki character: %s + (encode-coding-string + (format " +EsT %s = %s \n" - (encode-coding-string - (decode-uri-string uri-object 'utf-8-mcs-er) - 'utf-8-mcs-er))) + genre + (decode-uri-string uri-object 'utf-8-mcs-er)) + 'utf-8-mcs-er)) (princ "\n") + (when (eq genre 'character) + (dolist (feature (char-feature-property '$object 'additional-features)) + (mount-char-attribute-table + (char-feature-name-at-domain feature '$rev=latest)))) + (when (setq parents (www-get-feature-value object '<-denotational)) + (princ (format "

%s %s

\n
\n" + (www-format-value-as-char-list parents) + (www-format-feature-name '->denotational lang)))) + (when (setq parents (www-get-feature-value object '<-subsumptive)) + (princ (format "

%s %s

\n
\n" + (www-format-value-as-char-list parents) + (www-format-feature-name '->subsumptive lang)))) (princ (format "

%s

\n" - (www-format-encode-string (char-to-string object)))) + (www-format-encode-string (est-format-object object)))) (princ "
\n") (princ (encode-coding-string - (format "

(char : (%s : )

" + genre genre (decode-uri-string uri-object 'utf-8-mcs-er)) 'utf-8-mcs-er)) - (setq object-spec (char-attribute-alist object)) + (setq object-spec + (if (eq genre 'character) + (char-attribute-alist object) + (concord-object-spec object))) (if (string-match "\\*" (setq str (symbol-name feature-name))) (setq base-name (intern (substring str 0 (match-beginning 0))) metadata-name (intern (substring str (match-end 0)))) @@ -126,7 +144,8 @@ size=\"30\" maxlength=\"30\" value=\"%s\">)

(defun www-edit-display-feature-desc (uri-feature-name uri-property-name - &optional lang uri-object) + &optional lang + object-genre uri-object) (let ((feature-name (www-uri-decode-feature-name uri-feature-name)) (property-name (www-uri-decode-feature-name uri-property-name)) name@lang) @@ -273,10 +292,10 @@ size=\"30\" maxlength=\"30\" value=\"%s\">に限\u5B9Aしない) (decode-uri-string (cdr (assq 'property target)) 'utf-8-mcs-er) lang - (cdr (assq 'char target)) - ;; (decode-uri-string (cdr (assq 'char target)) - ;; 'utf-8-mcs-er) - ) + (car (nth 3 target)) + (cdr (nth 3 target)) + ;; (cdr (assq 'char target)) + ) ) (t (www-edit-display-object-desc -- 1.7.10.4