From: MORIOKA Tomohiko Date: Sat, 11 Dec 2010 02:41:08 +0000 (+0900) Subject: (www-add-display-feature-input-box): Abolished. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=be87febc6b5abd0db5a31861e65b9164698a193f;p=chise%2Fest.git (www-add-display-feature-input-box): Abolished. (www-add-display-object-desc): New implementation; use `www-edit-display-object-desc'; add new argument `genre'. (www-batch-add): Modify for `www-add-display-object-desc'. --- diff --git a/cwiki-add.el b/cwiki-add.el index d294880..eca73ea 100644 --- a/cwiki-add.el +++ b/cwiki-add.el @@ -2,66 +2,30 @@ (defvar chise-wiki-view-url "view.cgi") (defvar chise-wiki-edit-url "edit.cgi") -(require 'cwiki-format) +(require 'cwiki-edit) -(defun www-add-display-feature-input-box (char &optional format) - (unless format - (setq format 'default)) - (princ - "

") - (princ (encode-coding-string " \u2190 " 'utf-8-mcs-er)) - (princ - (format "%s -

-" - (if (or (eq format 'HEX)(eq format 'hex)) - "0x" - "") - format)) +;; (defun www-add-display-feature-input-box (char &optional format) +;; (unless format +;; (setq format 'default)) +;; (princ +;; "

") +;; (princ (encode-coding-string " \u2190 " 'utf-8-mcs-er)) +;; (princ +;; (format "%s +;;

+;; " +;; (if (or (eq format 'HEX)(eq format 'hex)) +;; "0x" +;; "") +;; format)) +;; ) + +(defun www-add-display-object-desc (genre uri-object &optional lang format) + (www-edit-display-object-desc genre uri-object "" lang format) ) -(defun www-add-display-char-desc (uri-char &optional lang format) - (when (stringp format) - (setq format (intern format))) - (let ((char (www-uri-decode-object 'character uri-char)) - char-spec) - (when (characterp char) - (princ - (format " -CHISE-wiki character: %s -\n" - (encode-coding-string - (decode-uri-string uri-char 'utf-8-mcs-er) - 'utf-8-mcs-er))) - (princ "\n") - (princ - (format "

%s

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

(char : )

-" - (decode-uri-string uri-char 'utf-8-mcs-er)) - 'utf-8-mcs-er)) - (www-add-display-feature-input-box char format) - (setq char-spec (char-attribute-alist char)) - (dolist (cell (sort char-spec - (lambda (a b) - (char-attribute-name< (car a)(car b))))) - (princ "

") - (princ - (www-format-eval-list - (or (char-feature-property (car cell) 'format) - '((name) " : " (value))) - char (car cell) lang uri-char)) - (princ "

\n")) - (princ "
\n") - ))) - (defun www-batch-add () (setq terminal-coding-system 'binary) (condition-case err @@ -93,9 +57,10 @@ size=\"30\" maxlength=\"30\" value=\"%s\">)

(list (decode-uri-string cell 'utf-8-mcs-er)))) (split-string target "&"))) (setq ret (car target)) - (cond ((eq (car ret) 'char) - (www-add-display-char-desc - (cdr ret) + (cond (t ; (eq (car ret) 'char) + (www-add-display-object-desc + (car ret) + (cdr ret) lang (decode-uri-string (cdr (assq 'format target)) 'utf-8-mcs-er))