;;; mime-edit.el --- Simple MIME Composer for GNU Emacs
-;; Copyright (C) 1993,1994,1995,1996,1997,1998 Free Software Foundation, Inc.
+;; Copyright (C) 1993,94,95,96,97,98,99 Free Software Foundation, Inc.
;; Author: UMEDA Masanobu <umerin@mse.kyutech.ac.jp>
;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
(require 'sendmail)
(require 'mail-utils)
(require 'mel)
+(require 'semi-def)
(require 'mime-view)
(require 'signature)
(require 'alist)
(eval-and-compile
(defconst mime-edit-version
- (eval-when-compile
- (concat
- (mime-product-name mime-user-interface-product) " "
- (mapconcat #'number-to-string
- (mime-product-version mime-user-interface-product) ".")
- " - \"" (mime-product-code-name mime-user-interface-product) "\"")))
- )
+ (concat
+ (mime-product-name mime-user-interface-product) " "
+ (mapconcat #'number-to-string
+ (mime-product-version mime-user-interface-product) ".")
+ " - \"" (mime-product-code-name mime-user-interface-product) "\"")))
;;; @ variables
("application"
("octet-stream" ("type" "" "tar" "shar"))
("postscript")
+ ("vnd.ms-powerpoint")
("x-kiss" ("x-cnf")))
("image"
("gif")
"base64"
"attachment" (("filename" . file))
)
+ ("\\.ppt$" ; MS Power Point
+ "application" "vnd.ms-powerpoint" nil
+ "base64"
+ "attachment" (("filename" . file))
+ )
("\\.pln$"
"text" "plain" nil
(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")
))
(mime-edit-translate-region beg end boundary))
(ctype (car ret))
(encoding (nth 1 ret))
- (pgp-boundary (concat "pgp-" boundary)))
+ (pgp-boundary (concat (if (eq 'gpg pgp-version)
+ "gpg-"
+ "pgp-")
+ boundary)))
(goto-char beg)
(insert header)
(insert (format "Content-Type: %s\n" ctype))
(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
;;;
(buf-name (buffer-name))
(temp-buf-name (concat "*temp-article:" buf-name "*"))
(buf (get-buffer temp-buf-name))
+ (pgp-processing mime-edit-pgp-processing)
)
(if buf
(progn
(setq mail-header-separator separator)
(make-local-variable 'mime-edit-buffer)
(setq mime-edit-buffer the-buf)
+ (setq mime-edit-pgp-processing pgp-processing)
(run-hooks 'mime-edit-translate-hook)
(mime-edit-translate-buffer)
"^Content-Transfer-Encoding:" limit t)
(let ((beg (match-beginning 0))
(hbeg (match-end 0))
- (end (std11-field-end)))
+ (end (std11-field-end limit)))
(setq encoding
(downcase
(eliminate-top-spaces
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)