+ charset)))))))
+
+(defun mm-body-encoding (charset &optional encoding)
+ "Do Content-Transfer-Encoding and return the encoding of the current buffer."
+ (let ((bits (mm-body-7-or-8)))
+ (cond
+ ((eq bits '7bit)
+ bits)
+ ((and (not mm-use-ultra-safe-encoding)
+ (or (eq t (cdr message-posting-charset))
+ (memq charset (cdr message-posting-charset))
+ (eq charset mail-parse-charset)))
+ bits)
+ (t
+ (let ((encoding (or encoding
+ (cdr (assq charset mm-body-charset-encoding-alist))
+ (mm-qp-or-base64))))
+ (when mm-use-ultra-safe-encoding
+ (setq encoding (mm-safer-encoding encoding)))
+ (mm-encode-content-transfer-encoding encoding "text/plain")
+ encoding)))))
+
+(defun mm-body-7-or-8 ()
+ "Say whether the body is 7bit or 8bit."