From: akr Date: Sun, 11 Apr 1999 14:32:15 +0000 (+0000) Subject: * mcs-e20.el (x-ctext): Define coding system `x-ctext' if `ctext' is X-Git-Tag: apel-9_17~19 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=23759e7a7e62c10a3b924bb8d23906fe5d57f5c4;p=elisp%2Fapel.git * mcs-e20.el (x-ctext): Define coding system `x-ctext' if `ctext' is not proper for decoding `iso-2022-jp-2'. * mcs-20.el (mime-charset-coding-system-alist): Use coding system `x-ctext' for MIME charset `x-ctext' if it is defined. --- diff --git a/ChangeLog b/ChangeLog index 2bbbc12..7a9fee1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +1999-04-11 Tanaka Akira + + * mcs-e20.el (x-ctext): Define coding system `x-ctext' if `ctext' is + not proper for decoding `iso-2022-jp-2'. + + * mcs-20.el (mime-charset-coding-system-alist): Use coding system + `x-ctext' for MIME charset `x-ctext' if it is defined. + 1999-04-09 Tanaka Akira * static.el: Add doc-strings. diff --git a/mcs-20.el b/mcs-20.el index 49bc116..5fcd204 100644 --- a/mcs-20.el +++ b/mcs-20.el @@ -39,13 +39,14 @@ (defcustom mime-charset-coding-system-alist (let ((rest - '((us-ascii . raw-text) + `((us-ascii . raw-text) (gb2312 . cn-gb-2312) (cn-gb . cn-gb-2312) (iso-2022-jp-2 . iso-2022-7bit-ss2) (tis-620 . tis620) (windows-874 . tis620) - (x-ctext . ctext) + ,@(unless (coding-system-p 'x-ctext) + '((x-ctext . ctext))) (unknown . undecided) (x-unknown . undecided) )) diff --git a/mcs-e20.el b/mcs-e20.el index 2903a0b..e18aa7b 100644 --- a/mcs-e20.el +++ b/mcs-e20.el @@ -28,6 +28,8 @@ ;;; Code: +(eval-when-compile (require 'static)) + (defsubst encode-mime-charset-region (start end charset &optional lbt) "Encode the text between START and END as MIME CHARSET." (let (cs) @@ -153,6 +155,16 @@ Return nil if corresponding MIME-charset is not found." dest) )) +(static-when (string= (decode-coding-string "\e.A\eN!" 'ctext) "\eN!") + (make-coding-system + 'x-ctext 2 ?f + "ISO 2022 based generic encoding for decoding unknown messages." + '((ascii t) (latin-iso8859-1 t) t t + shoft ascii-eol ascii-cntl seven locking-shift single-shift nil nil nil + init-bol nil nil) + '((safe-charsets . t)))) + + ;;; @ end ;;;