Synch with Oort Gnus.
[elisp/gnus.git-] / lisp / gnus-art.el
index 9485bf8..e7e4098 100644 (file)
@@ -3689,15 +3689,16 @@ value of the variable `gnus-show-mime' is non-nil."
        (goto-char (point-min))
        (or (search-forward "\n\n") (goto-char (point-max)))
        (let (buffer-read-only)
-         (delete-region (point) (point-max)))
-       (mm-display-parts handles)))))
+         (delete-region (point) (point-max))
+         (mm-display-parts handles))))))
 
 (defun gnus-mime-save-part-and-strip ()
   "Save the MIME part under point then replace it with an external body."
   (interactive)
   (gnus-article-check-buffer)
   (let* ((data (get-text-property (point) 'gnus-data))
-        file param)
+        file param
+        (handles gnus-article-mime-handles))
     (if (mm-multiple-handles gnus-article-mime-handles)
        (error "This function is not implemented"))
     (setq file (and data (mm-save-part data)))
@@ -3728,7 +3729,7 @@ value of the variable `gnus-show-mime' is non-nil."
                (mbl mml-buffer-list))
            (setq mml-buffer-list nil)
            (insert-buffer gnus-original-article-buffer)
-           (mime-to-mml gnus-article-mime-handles)
+           (mime-to-mml ',handles)
            (setq gnus-article-mime-handles nil)
            (let ((mbl1 mml-buffer-list))
              (setq mml-buffer-list mbl)
@@ -3809,7 +3810,7 @@ value of the variable `gnus-show-mime' is non-nil."
                            (mm-handle-undisplayer handle)
                            (mm-handle-disposition handle)
                            (mm-handle-description handle)
-                           (mm-handle-cache handle)
+                           nil
                            (mm-handle-id handle)))
       (setq gnus-article-mime-handles
            (mm-merge-handles gnus-article-mime-handles handle))
@@ -4044,7 +4045,8 @@ If no internal viewer is available, use an external viewer."
                      ;; This will remove the part.
                      (mm-display-part handle)
                    (save-restriction
-                     (narrow-to-region (point) (1+ (point)))
+                     (narrow-to-region (point)
+                                       (if (eobp) (point) (1+ (point))))
                      (mm-display-part handle)
                      ;; We narrow to the part itself and
                      ;; then call the treatment functions.