From d5eab78ac3923f7bcd6c0d7063330c9485e9c66d Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Thu, 18 Mar 2010 19:38:43 +0900 Subject: [PATCH] (www-parse-string-default): New function. (www-feature-parse-string): - Support new format `string'. - Use `www-parse-string-default' for `default'. --- cwiki-set.el | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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) -- 1.7.10.4