From 04cf28bb096d9e7af3eee4c888aa48b46e79df17 Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Tue, 16 Nov 2010 16:33:29 +0900 Subject: [PATCH] (www-uri-encode-object): Renamed from `www-uri-encode-char'. (www-format-value-as-char-list): Use `www-uri-encode-object' instead of `www-uri-encode-char'. (www-format-value-as-ids): Likewise. (www-format-eval-unit): Likewise. --- cwiki-common.el | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/cwiki-common.el b/cwiki-common.el index 53749f9..bf0e9e7 100644 --- a/cwiki-common.el +++ b/cwiki-common.el @@ -386,13 +386,13 @@ '=id (car (read-from-string char-rep)) genre) )))))) -(defun www-uri-encode-char (char) - (if (characterp char) - (if (encode-char char '=ucs) +(defun www-uri-encode-object (object) + (if (characterp object) + (if (encode-char object '=ucs) (mapconcat (lambda (byte) (format "%%%02X" byte)) - (encode-coding-string (char-to-string char) 'utf-8-mcs-er) + (encode-coding-string (char-to-string object) 'utf-8-mcs-er) "") (let ((ccs-list '(; =ucs =cns11643-1 =cns11643-2 =cns11643-3 @@ -415,21 +415,21 @@ ccs ret) (while (and ccs-list (setq ccs (pop ccs-list)) - (not (setq ret (encode-char char ccs 'defined-only))))) + (not (setq ret (encode-char object ccs 'defined-only))))) (cond (ret (format "%s:0x%X" (www-uri-encode-feature-name ccs) ret)) - ((and (setq ccs (car (split-char char))) - (setq ret (encode-char char ccs))) + ((and (setq ccs (car (split-char object))) + (setq ret (encode-char object ccs))) (format "%s:0x%X" (www-uri-encode-feature-name ccs) ret)) (t (format "system-char-id:0x%X" - (encode-char char 'system-char-id)) + (encode-char object 'system-char-id)) )))) - (format "rep.id:%s" (concord-object-id char)))) + (format "rep.id:%s" (concord-object-id object)))) (defun est-format-object (object) (if (characterp object) @@ -564,7 +564,7 @@ (if (characterp unit) (format "%s" chise-wiki-view-url - (www-uri-encode-char unit) + (www-uri-encode-object unit) (www-format-encode-string (char-to-string unit))) (format "%s" chise-wiki-view-url @@ -666,7 +666,7 @@ (if (characterp unit) (format "%s" chise-wiki-view-url - (www-uri-encode-char unit) + (www-uri-encode-object unit) (www-format-encode-string (char-to-string unit))) (www-format-encode-string (format "%s" unit))))) (ideographic-structure-to-ids value) " ") @@ -1034,7 +1034,7 @@ (unless value (setq value (www-get-feature-value object feature-name))) (unless uri-object - (setq uri-object (www-uri-encode-char object))) + (setq uri-object (www-uri-encode-object object))) (cond ((stringp exp) (www-format-encode-string exp)) ((null exp) "") @@ -1110,7 +1110,7 @@ (if prev-char (format "\n%s" chise-wiki-view-url - (www-uri-encode-char prev-char) + (www-uri-encode-object prev-char) "" ;; (www-format-encode-string ;; (char-to-string prev-char)) @@ -1125,7 +1125,7 @@ (if next-char (format "%s" chise-wiki-view-url - (www-uri-encode-char next-char) + (www-uri-encode-object next-char) "" ;; (www-format-encode-string ;; (char-to-string next-char)) -- 1.7.10.4