From: ueno Date: Sun, 28 Aug 2005 09:24:34 +0000 (+0000) Subject: riece-coding-system-for-prefix-server -> riece-coding-system-for-identity. X-Git-Tag: channel-coding-mergepoint~13 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74a32bea0ffc0bcf758657dc6a92060613f4490a;p=elisp%2Friece.git riece-coding-system-for-prefix-server -> riece-coding-system-for-identity. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ae41ca5..3facbe6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,7 +4,7 @@ riece-decoded-string & riece-decoded-string-for-identity. * riece-coding.el (riece-coding-system-alist): New user option. - (riece-coding-system-for-prefix-server): New function. + (riece-coding-system-for-identity): New function. (riece-encoded-string): New function. (riece-decoded-string): New alias. (riece-decoded-string-for-identity): New function. diff --git a/lisp/riece-coding.el b/lisp/riece-coding.el index 908598a..2cc5d4e 100644 --- a/lisp/riece-coding.el +++ b/lisp/riece-coding.el @@ -76,16 +76,16 @@ specifying the coding systems for decoding and encoding respectively." coding-system decoded) decoded)) -(defun riece-coding-system-for-prefix-server (prefix server) +(defun riece-coding-system-for-identity (identity) (let ((alist riece-coding-system-alist) - identity) + matcher) (catch 'found (while alist - (setq identity (riece-parse-identity (car (car alist)))) - (if (and (equal (riece-identity-server identity) - server) - (equal (riece-identity-prefix identity) - prefix)) + (setq matcher (riece-parse-identity (car (car alist)))) + (if (and (equal (riece-identity-server matcher) + (riece-identity-server identity)) + (equal (riece-identity-prefix matcher) + (riece-identity-prefix identity))) (throw 'found (cdr (car alist)))) (setq alist (cdr alist)))))) @@ -106,9 +106,7 @@ specifying the coding systems for decoding and encoding respectively." (defun riece-decoded-string-for-identity (decoded identity) "Return the string decoded for IDENTITY." - (let ((coding-system (riece-coding-system-for-prefix-server - (riece-identity-prefix identity) - (riece-identity-server identity)))) + (let ((coding-system (riece-coding-system-for-identity identity))) (if (and coding-system (not (eq (riece-decoded-coding-system string) coding-system)))