(mm-preferred-alternative-precedence): Don't bug out on nested related parts.
authorLars Ingebrigtsen <Lars Magne Ingebrigtsen larsi@gnus.org>
Sat, 22 Jan 2011 04:46:22 +0000 (05:46 +0100)
committerLars Ingebrigtsen <Lars Magne Ingebrigtsen larsi@gnus.org>
Sat, 22 Jan 2011 04:46:22 +0000 (05:46 +0100)
lisp/ChangeLog
lisp/mm-decode.el

index 0eef4da..45d224d 100644 (file)
@@ -1,5 +1,8 @@
 2011-01-22  Lars Ingebrigtsen  <larsi@gnus.org>
 
+       * mm-decode.el (mm-preferred-alternative-precedence): Don't bug out on
+       nested related parts.
+
        * nnfolder.el (nnfolder-request-expire-articles): Return the list of
        unexpired articles.  This fixes the regression that led expiry marks to
        disappear from nnfolder groups.
index 40cfa9b..ea65dd6 100644 (file)
@@ -1379,9 +1379,10 @@ Use CMD as the process."
        (setq handles (nconc (delete handle handles) (list handle))))))
   ;; Remove empty parts.
   (dolist (handle (copy-sequence handles))
-    (unless (with-current-buffer (mm-handle-buffer handle)
-             (goto-char (point-min))
-             (re-search-forward "[^ \t\n]" nil t))
+    (when (and (bufferp (mm-handle-buffer handle))
+              (not (with-current-buffer (mm-handle-buffer handle)
+                     (goto-char (point-min))
+                     (re-search-forward "[^ \t\n]" nil t))))
       (setq handles (nconc (delete handle handles) (list handle)))))
   (mapcar #'mm-handle-media-type handles))