From 726548f35e91bdb643e26678441cb9623e5640d5 Mon Sep 17 00:00:00 2001 From: morioka Date: Wed, 10 Jul 1996 11:22:55 +0000 Subject: [PATCH] (mime-editor/make-charset-default-encoding-alist): New function. (mime-editor/charset-default-encoding-alist): Use function `mime-editor/make-charset-default-encoding-alist'. (mime-editor/toggle-transfer-level): Use function `mime-editor/make-charset-default-encoding-alist'. --- mime-edit.el | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/mime-edit.el b/mime-edit.el index 02721fa..c2c5783 100644 --- a/mime-edit.el +++ b/mime-edit.el @@ -9,7 +9,7 @@ ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1994/08/21 renamed from mime.el by UMEDA Masanobu; ;;; 1996/05/24 renamed from tm-edit.el -;;; Version: $Revision: 0.31 $ +;;; Version: $Revision: 0.32 $ ;;; Keywords: mail, news, MIME, multimedia, multilingual ;;; ;;; This file is part of SEMI (September, Emacs MIME Interface) @@ -123,7 +123,7 @@ ;;; (defconst mime-editor/RCS-ID - "$Id: mime-edit.el,v 0.31 1996-07-10 10:58:09 morioka Exp $") + "$Id: mime-edit.el,v 0.32 1996-07-10 11:22:55 morioka Exp $") (defconst mime-editor/version (get-version-string mime-editor/RCS-ID)) @@ -361,8 +361,21 @@ If encoding is nil, it is determined from its contents.") "*A string formatted version of mime/defaul-transfer-level") (make-variable-buffer-local 'mime-editor/transfer-level-string) +(defun mime-editor/make-charset-default-encoding-alist (transfer-level) + (mapcar (function + (lambda (charset-type) + (let ((charset (car charset-type)) + (type (nth 1 charset-type)) + (encoding (nth 2 charset-type)) + ) + (if (<= type transfer-level) + (cons charset (mime/encoding-name type)) + (cons charset encoding) + )))) + mime-charset-type-list)) + (defvar mime-editor/charset-default-encoding-alist - (mime/make-charset-default-encoding-alist mime-editor/transfer-level)) + (mime-editor/make-charset-default-encoding-alist mime-editor/transfer-level)) (make-variable-buffer-local 'mime-editor/charset-default-encoding-alist) ;;; @@ about message inserting @@ -2215,7 +2228,7 @@ Optional TRANSFER-LEVEL is a number of transfer-level, 7 or 8." (setq mime-editor/transfer-level 7) )) (setq mime-editor/charset-default-encoding-alist - (mime/make-charset-default-encoding-alist + (mime-editor/make-charset-default-encoding-alist mime-editor/transfer-level)) (message (format "Current transfer-level is %d bit" mime-editor/transfer-level)) -- 1.7.10.4