From d8804610d01bd5a036b195776d724f987e4706c3 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 5 Nov 2007 06:44:32 +0000 Subject: [PATCH] (utf-7-imap): New coding system. (utf-7-imap-post-read-conversion): New function. (utf-7-imap-pre-write-conversion): New function. --- lisp/international/utf-7.el | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/lisp/international/utf-7.el b/lisp/international/utf-7.el index 0fff064ace8..09db420b565 100644 --- a/lisp/international/utf-7.el +++ b/lisp/international/utf-7.el @@ -46,13 +46,14 @@ (pre-write-conversion . utf-7-pre-write-conversion) (post-read-conversion . utf-7-post-read-conversion))) -;; (make-coding-system -;; 'utf-7-imap 0 ?u -;; "UTF-7 encoding of Unicode, IMAP version (RFC 2060)" -;; nil -;; `((safe-chars . ,(coding-system-get 'utf-16be 'safe-chars)) -;; (pre-write-conversion . utf-7-imap-pre-write-conversion) -;; (post-read-conversion . utf-7-imap-post-read-conversion))) +;;;###autoload(autoload-coding-system 'utf-7-imap '(require 'utf-7)) +(make-coding-system + 'utf-7-imap 0 ?u + "UTF-7 encoding of Unicode, IMAP version (RFC 2060)" + nil + `((safe-chars . ,(coding-system-get 'utf-16be 'safe-chars)) + (pre-write-conversion . utf-7-imap-pre-write-conversion) + (post-read-conversion . utf-7-imap-post-read-conversion))) (defun utf-7-decode (len imap) "Decode LEN bytes of UTF-7 at point. @@ -85,8 +86,8 @@ IMAP non-nil means use the IMAP version." (defun utf-7-post-read-conversion (len) (utf-7-decode len nil)) -;; (defun utf-7-imap-post-read-conversion (len) -;; (utf-7-decode len t)) +(defun utf-7-imap-post-read-conversion (len) + (utf-7-decode len t)) (defun utf-7-encode (from to imap) "Encode bytes between FROM and TO to UTF-7. @@ -133,8 +134,8 @@ ESC and SKIP-CHARS are adjusted for the normal and IMAP versions." (defun utf-7-pre-write-conversion (from to) (utf-7-encode from to nil)) -;; (defun utf-7-imap-pre-write-conversion (from to) -;; (utf-7-encode from to t)) +(defun utf-7-imap-pre-write-conversion (from to) + (utf-7-encode from to t)) (provide 'utf-7) -- 2.39.2