diff options
author | Gerd Moellmann <gerd@gnu.org> | 2001-07-06 10:03:25 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2001-07-06 10:03:25 +0000 |
commit | 3427b08525b08afd02eac2ed436daaf0c0a6b335 (patch) | |
tree | c2305f248f07bc2ef69f83b5412e379adb2c323b /lisp | |
parent | 4b81a999b9ec48098518586025791d405e396a74 (diff) | |
download | emacs-3427b08525b08afd02eac2ed436daaf0c0a6b335.tar.gz |
(rmail-output): Fix duplicate MIME-Version:
field problem with MIME-mode.
(rmail-output): Fix bug in MIME-mode.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mail/rmailout.el | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el index 9cf9a8f15e7..5bfe38a6e70 100644 --- a/lisp/mail/rmailout.el +++ b/lisp/mail/rmailout.el @@ -316,11 +316,26 @@ The optional fourth argument FROM-GNUS is set when called from GNUS." (setq mail-from (mail-fetch-field "Mail-From") mime-version - (mail-fetch-field "MIME-Version"))))) + (unless rmail-enable-mime + (mail-fetch-field "MIME-Version")))))) (save-excursion (set-buffer tembuf) (erase-buffer) (insert-buffer-substring rmailbuf) + (when rmail-enable-mime + (if original-headers-p + (delete-region (goto-char (point-min)) + (if (search-forward "\n*** EOOH ***\n") + (match-end 0))) + (goto-char (point-min)) + (forward-line 2) + (delete-region (point-min)(point)) + (search-forward "\n*** EOOH ***\n") + (delete-region (match-beginning 0) + (if (search-forward "\n\n") + (1- (match-end 0))))) + (setq buffer-file-coding-system (or rmail-file-coding-system + 'raw-text))) (rmail-delete-unwanted-fields t) (or (bolp) (insert "\n")) (goto-char (point-min)) |