* Sync up with semi-1_13_4.
[elisp/semi.git] / mime-edit.el
index 0679340..0ab79ad 100644 (file)
@@ -219,6 +219,7 @@ To insert a signature file automatically, call the function
     ("application"
      ("octet-stream" ("type" "" "tar" "shar"))
      ("postscript")
+     ("vnd.ms-powerpoint")
      ("x-kiss" ("x-cnf")))
     ("image"
      ("gif")
@@ -303,6 +304,11 @@ To insert a signature file automatically, call the function
      "base64"
      "attachment" (("filename" . file))
      )
+    ("\\.ppt$"                         ; MS Power Point
+     "application" "vnd.ms-powerpoint" nil
+     "base64"
+     "attachment" (("filename" . file))
+     )
 
     ("\\.pln$"
      "text"    "plain"         nil
@@ -483,6 +489,7 @@ If encoding is nil, it is determined from its contents."
     (cn-big5           8 "base64")
     (big5              8 "base64")
     (shift_jis         8 "base64")
+    (tis-620           8 "base64")
     (iso-2022-jp-2     7 "base64")
     (iso-2022-int-1    7 "base64")
     ))
@@ -502,19 +509,12 @@ If encoding is nil, it is determined from its contents."
   "A string formatted version of mime-transfer-level")
 (make-variable-buffer-local 'mime-transfer-level-string)
 
-;;
-;; some MUA reject long comment
-;;
+(defvar mime-edit-use-long-mime-charset-comment t
+  "*Use charset comment")
 
-(if (and (boundp 'mime-edit-use-long-mime-charset-comment)
-        mime-edit-use-long-mime-charset-comment)
-    (progn
-      (put 'iso-2022-jp-2 'mime-charset-comment "RFC1554")
-      (put 'iso-2022-jp 'mime-charset-comment "RFC1468 with trivial bugfix")
-      )
-  )
+(put 'iso-2022-jp-2 'mime-charset-comment "RFC1554")
+(put 'iso-2022-jp 'mime-charset-comment "RFC1468 with trivial bugfix")
 
-  
 ;;; @@ about content transfer encoding
 
 (defvar mime-content-transfer-encoding-priority-list
@@ -1382,7 +1382,7 @@ Optional argument ENCODING specifies an encoding method such as base64."
             (mime-edit-get-contype tag)
             "charset"
             (let ((comment (get charset 'mime-charset-comment)))
-              (if comment
+              (if (and mime-edit-use-long-mime-charset-comment comment)
                   (concat (upcase (symbol-name charset)) " (" comment ")")
                 (upcase (symbol-name charset)))))
            (mime-edit-get-encoding tag)))
@@ -2177,8 +2177,7 @@ Content-Transfer-Encoding: 7bit
     (goto-char (point-min))
     (while (re-search-forward regexp nil t)
       (delete-region (match-beginning 0)
-                    (progn (forward-line 1) (point)))
-      )))
+                    (1+ (std11-field-end))))))
 
 \f
 ;;;
@@ -2713,9 +2712,15 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n"
                              encoding nil)
                        )))))))
     (if (or encoded (not not-decode-text))
-       (decode-mime-charset-region (point-min)(point-max)
-                                   (or charset default-mime-charset))
-      )
+       (progn
+         (save-excursion
+           (goto-char (point-min))
+           (while (re-search-forward "\r\n" nil t)
+             (replace-match "\n")
+             ))
+         (decode-mime-charset-region (point-min)(point-max)
+                                     (or charset default-mime-charset))
+         ))
     (let ((he (if (re-search-forward "^$" nil t)
                  (match-end 0)
                (point-min)