Merge from gnus--rel--5.10
[gnus] / lisp / gnus-uu.el
index 08c9bce..aaf6472 100644 (file)
@@ -1,7 +1,7 @@
 ;;; gnus-uu.el --- extract (uu)encoded files in Gnus
 
 ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998,
-;;   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;;   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Created: 2 Oct 1993
@@ -488,9 +488,10 @@ didn't work, and overwrite existing files.  Otherwise, ask each time."
        ;; The case where neither a number of articles nor a region is
        ;; specified.
        (gnus-summary-top-thread)
-       (setq gnus-article-reply (gnus-uu-get-list-of-articles nil)))
-      ;; Specify articles to be forwarded.
-      (setq gnus-newsgroup-processable (copy-sequence gnus-article-reply))
+       (setq gnus-article-reply (nreverse (gnus-uu-find-articles-matching))))
+      ;; Specify articles to be forwarded.  Note that they should be
+      ;; reversed; see `gnus-uu-get-list-of-articles'.
+      (setq gnus-newsgroup-processable (reverse gnus-article-reply))
       (gnus-setup-message 'forward
        (setq gnus-uu-digest-from-subject nil)
        (setq gnus-uu-digest-buffer
@@ -852,7 +853,9 @@ When called interactively, prompt for REGEXP."
                       "Date: %s\nFrom: %s\nSubject: %s Digest\n\n"
                       (message-make-date) name name))
              (when (and message-forward-as-mime gnus-uu-digest-buffer)
-               (insert "<#part type=message/rfc822>\nSubject: Topics\n\n"))
+               (insert
+                "<#mml type=message/rfc822>\nSubject: Topics\n\n<#/mml>\n")
+               (forward-line -1))
              (insert "Topics:\n")))
        (when (not (eq in-state 'end))
          (setq state (list 'middle))))