tm 7.96.
[elisp/tm.git] / tm-edit.el
index 15185ca..a032c4f 100644 (file)
@@ -6,7 +6,7 @@
 ;;         MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Created: 1994/08/21 renamed from mime.el
-;; Version: $Revision: 7.95 $
+;; Version: $Revision: 7.96 $
 ;; Keywords: mail, news, MIME, multimedia, multilingual
 
 ;; This file is part of tm (Tools for MIME).
 ;;;
 
 (defconst mime-editor/RCS-ID
-  "$Id: tm-edit.el,v 7.95 1996/12/04 04:43:01 morioka Exp $")
+  "$Id: tm-edit.el,v 7.96 1996/12/10 06:28:34 morioka Exp $")
 
 (defconst mime-editor/version (get-version-string mime-editor/RCS-ID))
 
@@ -2479,18 +2479,27 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n"
             (t
              (let* (charset
                     (pstr
-                     (mapconcat (function
-                                 (lambda (attr)
-                                   (if (string-equal (car attr)
-                                                     "charset")
-                                       (progn
-                                         (setq charset (cdr attr))
-                                         "")
-                                     (concat ";" (car attr)
-                                             "=" (cdr attr))
-                                     )
-                                   ))
-                                params ""))
+                     (let ((bytes (+ 14 (length ctype))))
+                       (mapconcat (function
+                                   (lambda (attr)
+                                     (if (string-equal (car attr) "charset")
+                                         (progn
+                                           (setq charset (cdr attr))
+                                           "")
+                                       (let* ((str
+                                               (concat (car attr)
+                                                       "=" (cdr attr))
+                                               )
+                                              (bs (length str))
+                                              )
+                                         (setq bytes (+ bytes bs 2))
+                                         (if (< bytes 76)
+                                             (concat "; " str)
+                                           (setq bytes (+ bs 1))
+                                           (concat ";\n " str)
+                                           )
+                                         ))))
+                                  params "")))
                     encoding
                     encoded)
                (save-excursion