From: MORIOKA Tomohiko Date: Thu, 18 Mar 2010 10:38:43 +0000 (+0900) Subject: (www-parse-string-default): New function. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5eab78ac3923f7bcd6c0d7063330c9485e9c66d;p=chise%2Fest.git (www-parse-string-default): New function. (www-feature-parse-string): - Support new format `string'. - Use `www-parse-string-default' for `default'. --- diff --git a/cwiki-set.el b/cwiki-set.el index 9950fd2..9d8156f 100644 --- a/cwiki-set.el +++ b/cwiki-set.el @@ -6,6 +6,16 @@ (require 'cwiki-view) +(defun www-parse-string-default (string) + (setq string (decode-uri-string string 'utf-8-mcs-er)) + (condition-case nil + (let ((ret + (mapcar #'read (split-string string " ")))) + (if (cdr ret) + ret + (car ret))) + (error nil))) + (defun www-parse-string-as-space-separated-char-list (string) (let (dest char) (dolist (unit (split-string string "\\+")) @@ -47,12 +57,17 @@ (string-to-number string)) ((or (eq format 'HEX)(eq format 'hex)) (string-to-number string 16)) + ((eq format 'string) + (decode-uri-string string 'utf-8-mcs-er) + ) ((eq format 'S-exp) (if (= (length string) 0) nil (read (decode-uri-string string 'utf-8-mcs-er))) ) - (t (decode-uri-string string 'utf-8-mcs-er)))) + (t + (www-parse-string-default string) + ))) (defun www-set-display-char-desc (uri-char feature value format &optional lang) (when (stringp feature)