From ce4c1b15ba829d376130248cc68a6760e5693535 Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Fri, 19 Mar 2010 06:01:20 +0900 Subject: [PATCH] (www-format-feature-name-as-metadata): New function. (www-format-feature-name*): Use `www-format-feature-name-as-metadata' for metadata features. --- cwiki-common.el | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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)) -- 1.7.10.4