(www-format-feature-name-as-metadata): New function.
authorMORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
Thu, 18 Mar 2010 21:01:20 +0000 (06:01 +0900)
committerMORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
Thu, 18 Mar 2010 21:01:20 +0000 (06:01 +0900)
(www-format-feature-name*): Use `www-format-feature-name-as-metadata'
for metadata features.

cwiki-common.el

index 28fbcda..4ca601c 100644 (file)
     "-")
    " "))
 
+(defun www-format-feature-name-as-metadata (feature-name &optional lang)
+  (let ((str (symbol-name feature-name))
+       base meta)
+    (cond
+     ((string-match "\\*[^*]+$" str)
+      (setq base (substring str 0 (match-beginning 0))
+           meta (substring str (match-beginning 0)))
+      (concat (www-format-feature-name* (intern base) lang)
+             meta))
+     (t
+      (www-format-feature-name-default feature-name)
+      ))))
+
 (defun www-format-feature-name-as-rel-to (feature-name)
   (concat "\u2192" (substring (symbol-name feature-name) 2)))
 
      ((find-charset feature-name)
       (www-format-feature-name-as-CCS feature-name))
      ((and (setq name (symbol-name feature-name))
-          (string-match "^\\(->\\)" name))
+          (string-match "\\*" name))
+      (www-format-feature-name-as-metadata feature-name lang))
+     ((string-match "^\\(->\\)" name)
       (www-format-feature-name-as-rel-to feature-name))
      ((string-match "^\\(<-\\)" name)
       (www-format-feature-name-as-rel-from feature-name))