From: MORIOKA Tomohiko
Date: Thu, 18 Mar 2010 20:37:56 +0000 (+0900)
Subject: (www-edit-display-char-feature-default): Abolish.
X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e06feaf80e5d7e3bd2ed86f576edf68b1f8ec2f;p=chise%2Fest.git
(www-edit-display-char-feature-default): Abolish.
(www-edit-display-char-feature-as-ucs): Abolish.
(www-edit-display-input-box): Add the first argument `object'; modify
for `www-format-apply-value'.
(www-edit-display-feature-input-box): Modify input boxes; modify for
`www-format-value'.
(www-edit-display-feature-desc): Modify for
`www-edit-display-input-box'.
---
diff --git a/cwiki-edit.el b/cwiki-edit.el
index 45d19c0..f33c550 100644
--- a/cwiki-edit.el
+++ b/cwiki-edit.el
@@ -4,30 +4,30 @@
(require 'cwiki-common)
-(defun www-edit-display-char-feature-default (char feature-name &optional value
- lang)
- (unless value
- (setq value (www-char-feature char feature-name)))
- (www-html-display-paragraph
- (format "[[%s|%s?feature=%s]] : %s [[[edit|edit.cgi?char=%s&feature=%s]]]"
- (www-format-feature-name feature-name lang)
- chise-wiki-view-url
- (www-uri-encode-feature-name feature-name)
- (www-format-value value feature-name nil 'without-tags)
- (char-to-string char)
- (www-uri-encode-feature-name feature-name)
- )))
+;; (defun www-edit-display-char-feature-default (char feature-name &optional value
+;; lang)
+;; (unless value
+;; (setq value (www-char-feature char feature-name)))
+;; (www-html-display-paragraph
+;; (format "[[%s|%s?feature=%s]] : %s [[[edit|edit.cgi?char=%s&feature=%s]]]"
+;; (www-format-feature-name feature-name lang)
+;; chise-wiki-view-url
+;; (www-uri-encode-feature-name feature-name)
+;; (www-format-value char feature-name value nil 'without-tags)
+;; (char-to-string char)
+;; (www-uri-encode-feature-name feature-name)
+;; )))
-(defun www-edit-display-char-feature-as-ucs (char feature-name &optional value)
- (unless value
- (setq value (www-char-feature char feature-name)))
- (www-html-display-paragraph
- (format "= [[U+%s|http://www.unicode.org/cgi-bin/GetUnihanData.pl?codepoint=%s]] (%d)"
- (www-format-value-as-HEX value)
- (www-format-value-as-HEX value)
- value)))
+;; (defun www-edit-display-char-feature-as-ucs (char feature-name &optional value)
+;; (unless value
+;; (setq value (www-char-feature char feature-name)))
+;; (www-html-display-paragraph
+;; (format "= [[U+%s|http://www.unicode.org/cgi-bin/GetUnihanData.pl?codepoint=%s]] (%d)"
+;; (www-format-value-as-HEX value)
+;; (www-format-value-as-HEX value)
+;; value)))
-(defun www-edit-display-input-box (name value &optional format)
+(defun www-edit-display-input-box (object name value &optional format)
(when (stringp format)
(setq format (intern format)))
(let (prefix)
@@ -47,7 +47,8 @@ size=\"30\" maxlength=\"30\" value=\"%s\">
"
(www-format-encode-string
(format "%s" name) 'without-tags)
- (www-format-apply-value format nil value
+ (www-format-apply-value object name
+ format nil value
nil nil
'without-tags)
))))
@@ -58,20 +59,20 @@ size=\"30\" maxlength=\"30\" value=\"%s\">
(setq format 'default))
(princ
(format ""
+size=\"32\" maxlength=\"256\" value=\"%s\">"
feature-name))
(princ (encode-coding-string " \u2190 " 'utf-8-mcs-er))
(princ
(format "%s
+size=\"64\" maxlength=\"256\" value=\"%s\">
"
(if (or (eq format 'HEX)(eq format 'hex))
"0x"
"")
format
- (www-format-value (www-char-feature char feature-name)
- feature-name
+ (www-format-value char feature-name
+ (www-char-feature char feature-name)
format 'without-tags)))
)
@@ -129,10 +130,7 @@ size=\"30\" maxlength=\"30\" value=\"%s\">)
(when (and (eq base-name (car cell)) metadata-name)
(princ "\n")
(princ "- ")
- ;; (www-edit-display-input-box feature-name
- ;; (www-char-feature char feature-name)
- ;; format)
- (www-edit-display-feature-input-box char feature-name format)
+ (www-edit-display-feature-input-box char feature-name format)
(princ "
")
(princ "
"))
))
@@ -171,6 +169,7 @@ size=\"30\" maxlength=\"30\" value=\"%s\">ã«é\u5B9Aããªã)
(princ "")
(if (eq property-name 'name)
(www-edit-display-input-box
+ feature-name
property-name
(or (www-format-feature-name* feature-name) ""))
(www-html-display-paragraph
@@ -183,6 +182,7 @@ size=\"30\" maxlength=\"30\" value=\"%s\">ã«é\u5B9Aããªã)
(setq name@lang (intern (format "name@%s" lang)))
(if (eq property-name name@lang)
(www-edit-display-input-box
+ feature-name
name@lang
(or (char-feature-property feature-name name@lang) ""))
(www-html-display-paragraph