(char-feature-name-sans-versions): New function.
authorMORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
Thu, 18 Mar 2010 13:14:05 +0000 (22:14 +0900)
committerMORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
Thu, 18 Mar 2010 13:14:05 +0000 (22:14 +0900)
cwiki-common.el

index bb339a6..e4f64e8 100644 (file)
       (intern (format "%s@%s" name domain))
       ))))
 
+(defun char-feature-name-sans-versions (feature)
+  (let ((feature-name (symbol-name feature)))
+    (if (string-match "[@/]\\$rev=latest$" feature-name)
+       (intern (substring feature-name 0 (match-beginning 0)))
+      feature)))
+
 (defun www-char-feature (character feature)
   (let ((latest-feature (char-feature-name-at-domain feature '$rev=latest)))
     (mount-char-attribute-table latest-feature)