(www-parse-string-as-wiki-text): New function [currently just a stub].
authorMORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
Thu, 18 Mar 2010 13:18:12 +0000 (22:18 +0900)
committerMORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
Thu, 18 Mar 2010 13:18:12 +0000 (22:18 +0900)
(www-feature-parse-string): Use `www-parse-string-as-wiki-text'.
(www-set-display-char-desc): Use `char-feature-name-sans-versions'.

cwiki-set.el

index 0429584..b7ace7a 100644 (file)
@@ -44,6 +44,9 @@
            (+ (lsh (+ ku 32) 8)
               ten 32)))))
 
+(defun www-parse-string-as-wiki-text (string)
+  (list (decode-uri-string string 'utf-8-mcs-er)))
+
 (defun www-feature-parse-string (feature-name string &optional format)
   (unless format
     (setq format (www-feature-value-format feature-name)))
@@ -60,6 +63,9 @@
        ((eq format 'string)
         (decode-uri-string string 'utf-8-mcs-er)
         )
+       ((eq format 'wiki-text)
+        (www-parse-string-as-wiki-text string)
+        )
        ((eq format 'S-exp)
         (if (= (length string) 0)
             nil
@@ -76,7 +82,7 @@
     (setq format (intern format)))
   (let ((char (www-uri-decode-char uri-char))
        latest-feature
-       feature-name logical-feature displayed-features)
+       logical-feature displayed-features)
     (when (characterp char)
       (princ
        (encode-coding-string
       (dolist (cell (sort (char-attribute-alist char)
                          (lambda (a b)
                            (char-attribute-name< (car a)(car b)))))
-       (setq feature-name (symbol-name (car cell)))
        (setq logical-feature
-             (if (string-match "[@/]\\$rev=latest$" feature-name)
-                 (intern (substring feature-name 0 (match-beginning 0)))
-               (car cell)))
+             (char-feature-name-sans-versions (car cell)))
        (unless (memq logical-feature displayed-features)
          (push logical-feature displayed-features)
          (princ "<p>")
          (princ
           (www-format-eval-list
-           (or (char-feature-property (car cell) 'format)
+           (or (char-feature-property logical-feature 'format)
                '((name) " : " (value)))
-           char (car cell) lang uri-char))
+           char logical-feature lang uri-char))
          (princ
-          (format " <a href=\"%s?char=%s&feature=%s\"
+          (format " <a href=\"%s?char=%s&feature=%s&format=wiki-text\"
 ><input type=\"submit\" value=\"note\" /></a>"
                   chise-wiki-edit-url
                   (www-format-encode-string uri-char)
                   (www-format-encode-string
                    (www-uri-encode-feature-name
-                    (intern (format "%s*note" (car cell)))))))
+                    (intern (format "%s*note" logical-feature))))))
          (princ "</p>\n")
          ))
       (princ