(www-feature-type): Support `*node' and `*sources'.
authorMORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
Thu, 18 Mar 2010 13:57:49 +0000 (22:57 +0900)
committerMORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
Thu, 18 Mar 2010 13:57:49 +0000 (22:57 +0900)
(www-feature-value-format): Return `wiki-text' for type `stext'.
(www-format-apply-value): Don't set `default' even if a format is not
supported in this function.

cwiki-common.el

index e4f64e8..9681fbe 100644 (file)
   (or (char-feature-property feature-name 'type)
       (let ((str (symbol-name feature-name)))
        (cond
+        ((string-match "\\*note\\(@[^*]+\\)?$" str)
+         'stext)
+        ((string-match "\\*sources\\(@[^*]+\\)?$" str)
+         'domain-list)
+        ((string-match "\\*" str)
+         nil)
         ((string-match "^\\(->\\|<-\\)" str)
          'relation)
         ((string-match "^ideographic-structure\\(@\\|$\\)" str)
        (cond ((eq type 'relation)
               'space-separated-char-list)
              ((eq type 'structure)
-              'space-separated-ids)))
+              'space-separated-ids)
+             ((eq type 'stext)
+              'wiki-text)
+             ))
       (if (find-charset feature-name)
          (if (and (= (charset-dimension feature-name) 2)
                   (= (charset-chars feature-name) 94))
           ((eq format 'space-separated-ids)
            (www-format-value-as-ids value without-tags))
           (t
-           (setq format 'default)
+            ;; (setq format 'default)
            (www-format-encode-string
             (format (www-format-props-to-string props 'default)
                     value)