diff options
Diffstat (limited to 'lisp/gnus/mm-partial.el')
-rw-r--r-- | lisp/gnus/mm-partial.el | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/lisp/gnus/mm-partial.el b/lisp/gnus/mm-partial.el index f424062130b..693e8e9278d 100644 --- a/lisp/gnus/mm-partial.el +++ b/lisp/gnus/mm-partial.el @@ -1,5 +1,5 @@ ;;; mm-partial.el --- showing message/partial -;; Copyright (C) 2000 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu> ;; Keywords: message partial @@ -25,8 +25,7 @@ ;;; Code: -(eval-when-compile - (require 'cl)) +(eval-when-compile (require 'cl)) (require 'gnus-sum) (require 'mm-util) @@ -43,7 +42,8 @@ (gnus-request-article-this-buffer (aref header 0) gnus-newsgroup-name) (when (search-forward id nil t) - (let ((nhandles (mm-dissect-buffer)) nid) + (let ((nhandles (mm-dissect-buffer + nil gnus-article-loose-mime)) nid) (if (consp (car nhandles)) (mm-destroy-parts nhandles) (setq nid (cdr (assq 'id @@ -83,10 +83,7 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing." (cdr (mm-handle-type b))))))) (< anumber bnumber))))) (setq gnus-article-mime-handles - (append (if (listp (car gnus-article-mime-handles)) - gnus-article-mime-handles - (list gnus-article-mime-handles)) - phandles)) + (mm-merge-handles gnus-article-mime-handles phandles)) (save-excursion (set-buffer (generate-new-buffer " *mm*")) (while (setq phandle (pop phandles)) @@ -117,6 +114,13 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing." (if (<= n total) (error "Missing part %d" n)) (kill-buffer (mm-handle-buffer handle)) + (goto-char (point-min)) + (let ((point (if (search-forward "\n\n" nil t) + (1- (point)) + (point-max)))) + (goto-char (point-min)) + (unless (re-search-forward "^mime-version:" point t) + (insert "MIME-Version: 1.0\n"))) (setcar handle (current-buffer)) (mm-handle-set-cache handle t))) (unless no-display @@ -131,11 +135,7 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing." (when handles ;; It is in article buffer. (setq gnus-article-mime-handles - (nconc (if (listp (car gnus-article-mime-handles)) - gnus-article-mime-handles - (list gnus-article-mime-handles)) - (if (listp (car handles)) - handles (list handles))))) + (mm-merge-handles gnus-article-mime-handles handles))) (mm-handle-set-undisplayer handle `(lambda () @@ -149,5 +149,7 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing." (error nil)) (delete-region ,(point-min-marker) ,(point-max-marker)))))))))) +(provide 'mm-partial) + ;;; arch-tag: 460e7424-05f2-4a1d-a0f2-70ec081eff7d ;;; mm-partial.el ends here |