(mime-editor/make-charset-default-encoding-alist): New function.
authormorioka <morioka>
Wed, 10 Jul 1996 11:22:55 +0000 (11:22 +0000)
committermorioka <morioka>
Wed, 10 Jul 1996 11:22:55 +0000 (11:22 +0000)
(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

index 02721fa..c2c5783 100644 (file)
@@ -9,7 +9,7 @@
 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; 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)
 ;;;
 
 (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))