From a54ed69623f7bd78fc6e741e86b6748d7737832b Mon Sep 17 00:00:00 2001
From: MORIOKA Tomohiko
Date: Sun, 5 Dec 2010 03:11:04 +0900
Subject: [PATCH] (www-edit-display-object-desc): Renamed from
`www-edit-display-char-desc'; add new argument `genre'.
(www-batch-edit): Modify for
`www-edit-display-object-desc'.
---
cwiki-edit.el | 49 ++++++++++++++++++++++++++++++-------------------
1 file changed, 30 insertions(+), 19 deletions(-)
diff --git a/cwiki-edit.el b/cwiki-edit.el
index eb22d27..b526cfb 100644
--- a/cwiki-edit.el
+++ b/cwiki-edit.el
@@ -62,48 +62,48 @@ size=\"64\" maxlength=\"256\" value=\"%s\">
"")))
)
-(defun www-edit-display-char-desc (uri-char uri-feature-name
- &optional lang format)
+(defun www-edit-display-object-desc (genre uri-object uri-feature-name
+ &optional lang format)
(when (stringp format)
(setq format (intern format)))
- (let ((char (www-uri-decode-object 'character uri-char))
+ (let ((object (www-uri-decode-object genre uri-object))
(feature-name (www-uri-decode-feature-name uri-feature-name))
base-name metadata-name
- char-spec str)
- (when (characterp char)
+ object-spec str)
+ (when (characterp object)
(princ
(format "
CHISE-wiki character: %s
\n"
(encode-coding-string
- (decode-uri-string uri-char 'utf-8-mcs-er)
+ (decode-uri-string uri-object 'utf-8-mcs-er)
'utf-8-mcs-er)))
(princ "\n")
(princ
(format "%s
\n"
- (www-format-encode-string (char-to-string char))))
+ (www-format-encode-string (char-to-string object))))
(princ "
\n")
(when (and (eq base-name (car cell)) metadata-name)
(princ "\n")
(princ "- ")
- (www-edit-display-feature-input-box char feature-name format)
+ (www-edit-display-feature-input-box object feature-name format)
(princ "
")
(princ "
"))
))
@@ -126,7 +126,7 @@ size=\"30\" maxlength=\"30\" value=\"%s\">)
(defun www-edit-display-feature-desc (uri-feature-name
uri-property-name
- &optional lang uri-char)
+ &optional lang 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)
@@ -150,7 +150,7 @@ size=\"30\" maxlength=\"30\" value=\"%s\">\n"
(format "(ã«é\u5B9Aããªã)
"
- (decode-uri-string uri-char 'utf-8-mcs-er))
+ (decode-uri-string uri-object 'utf-8-mcs-er))
'utf-8-mcs-er))
(princ "
")
(if (eq property-name 'name)
@@ -258,7 +258,8 @@ size=\"30\" maxlength=\"30\" value=\"%s\">ã«é\u5B9Aããªã)
(split-string target "&")))
(setq ret (car target))
(cond ((eq (car ret) 'char)
- (www-edit-display-char-desc
+ (www-edit-display-object-desc
+ 'character
(cdr ret) ; (decode-uri-string (cdr ret) 'utf-8-mcs-er)
(decode-uri-string (cdr (assq 'feature target))
'utf-8-mcs-er)
@@ -276,6 +277,16 @@ size=\"30\" maxlength=\"30\" value=\"%s\">ã«é\u5B9Aããªã)
;; (decode-uri-string (cdr (assq 'char target))
;; 'utf-8-mcs-er)
)
+ )
+ (t
+ (www-edit-display-object-desc
+ (car ret)
+ (cdr ret)
+ (decode-uri-string (cdr (assq 'feature target))
+ 'utf-8-mcs-er)
+ lang
+ (decode-uri-string (cdr (assq 'format target))
+ 'utf-8-mcs-er))
))
(www-html-display-paragraph
(format "%S" target))
--
1.7.10.4