(www-edit-display-feature-input-box): New function.
authorMORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
Thu, 18 Mar 2010 13:15:54 +0000 (22:15 +0900)
committerMORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
Thu, 18 Mar 2010 13:15:54 +0000 (22:15 +0900)
(www-edit-display-char-desc): Use
`www-edit-display-feature-input-box'.

cwiki-edit.el

index 7e4d6ae..45d19c0 100644 (file)
@@ -52,6 +52,29 @@ size=\"30\" maxlength=\"30\" value=\"%s\">
                                     'without-tags)
             ))))
 
+(defun www-edit-display-feature-input-box (char feature-name
+                                               &optional format)
+  (unless format
+    (setq format 'default))
+  (princ
+   (format "<p><input type=\"text\" name=\"feature-name\"
+size=\"30\" maxlength=\"30\" value=\"%s\">"
+          feature-name))
+  (princ (encode-coding-string " \u2190 " 'utf-8-mcs-er))
+  (princ
+   (format "%s<input type=\"text\" name=\"%s\"
+size=\"30\" maxlength=\"30\" value=\"%s\">
+<input type=\"submit\" value=\"set\" /></p>
+"
+          (if (or (eq format 'HEX)(eq format 'hex))
+              "0x"
+            "")
+          format
+          (www-format-value (www-char-feature char feature-name)
+                            feature-name
+                            format 'without-tags)))
+  )
+
 (defun www-edit-display-char-desc (uri-char uri-feature-name
                                            &optional lang format)
   (when (stringp format)
@@ -93,25 +116,7 @@ size=\"30\" maxlength=\"30\" value=\"%s\">)</p>
                            (char-attribute-name< (car a)(car b)))))
        (cond
         ((eq (car cell) feature-name)
-          ;; (www-edit-display-input-box feature-name (cdr cell) format)
-         (princ
-          (format "<p><input type=\"text\" name=\"feature-name\"
-size=\"30\" maxlength=\"30\" value=\"%s\">"
-                  feature-name))
-         (princ (encode-coding-string " \u2190 " 'utf-8-mcs-er))
-         (princ
-          (format "%s<input type=\"text\" name=\"%s\"
-size=\"30\" maxlength=\"30\" value=\"%s\">
-<input type=\"submit\" value=\"set\" /></p>
-"
-                  (if (or (eq format 'HEX)(eq format 'hex))
-                      "0x"
-                    "")
-                  format
-                  (www-format-value (www-char-feature char (car cell))
-                                    ;;(cdr cell)
-                                    feature-name
-                                    format 'without-tags)))
+         (www-edit-display-feature-input-box char feature-name format)
          )
         (t
          (princ "<p>")
@@ -124,9 +129,10 @@ size=\"30\" maxlength=\"30\" value=\"%s\">
          (when (and (eq base-name (car cell)) metadata-name)
            (princ "<ul>\n")
            (princ "<li>")
-           (www-edit-display-input-box feature-name
-                                       (www-char-feature char feature-name)
-                                       format)
+            ;; (www-edit-display-input-box feature-name
+            ;;                             (www-char-feature char feature-name)
+            ;;                             format)
+           (www-edit-display-feature-input-box char feature-name format)
            (princ "</li>")
            (princ "</ul>"))
          ))