From: MORIOKA Tomohiko Date: Thu, 18 Mar 2010 21:01:20 +0000 (+0900) Subject: (www-format-feature-name-as-metadata): New function. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ce4c1b15ba829d376130248cc68a6760e5693535;p=chise%2Fest.git (www-format-feature-name-as-metadata): New function. (www-format-feature-name*): Use `www-format-feature-name-as-metadata' for metadata features. --- diff --git a/cwiki-common.el b/cwiki-common.el index 28fbcda..4ca601c 100644 --- a/cwiki-common.el +++ b/cwiki-common.el @@ -250,6 +250,19 @@ "-") " ")) +(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))) @@ -288,7 +301,9 @@ ((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))