diff lisp/gnus/gnus-sum.el @ 31785:51cea22fd2aa

Merge from Gnus trunk.
author Dave Love <fx@gnu.org>
date Wed, 20 Sep 2000 16:54:57 +0000
parents 9968f55ad26e
children 5155c0078eb9
line wrap: on
line diff
--- a/lisp/gnus/gnus-sum.el	Wed Sep 20 16:52:10 2000 +0000
+++ b/lisp/gnus/gnus-sum.el	Wed Sep 20 16:54:57 2000 +0000
@@ -885,6 +885,14 @@
   :type '(choice (const nil)
 		 integer))
 
+(defcustom gnus-summary-save-parts-default-mime "image/.*"
+  "*A regexp to match MIME parts when saving multiple parts of a message
+with gnus-summary-save-parts (X m). This regexp will be used by default
+when prompting the user for which type of files to save."
+  :group 'gnus-summary
+  :type 'regexp)
+
+
 ;;; Internal variables
 
 (defvar gnus-article-mime-handles nil)
@@ -902,6 +910,9 @@
 (defvar gnus-sort-gathered-threads-function 'gnus-thread-sort-by-number
   "Function called to sort the articles within a thread after it has been gathered together.")
 
+(defvar gnus-summary-save-parts-type-history nil)
+(defvar gnus-summary-save-parts-last-directory nil)
+
 ;; Avoid highlighting in kill files.
 (defvar gnus-summary-inhibit-highlight nil)
 (defvar gnus-newsgroup-selected-overlay nil)
@@ -3300,7 +3311,9 @@
 		 (nnheader-nov-read-integer) ; chars
 		 (nnheader-nov-read-integer) ; lines
 		 (unless (eobp)
-		   (nnheader-nov-field)) ; misc
+		   (if (looking-at "Xref: ")
+		       (goto-char (match-end 0)))
+		   (nnheader-nov-field)) ; Xref
 		 (nnheader-nov-parse-extra)))) ; extra
 
       (widen))
@@ -9195,8 +9208,14 @@
   "Save parts matching TYPE to DIR.
 If REVERSE, save parts that do not match TYPE."
   (interactive
-   (list (read-string "Save parts of type: " "image/.*")
-	 (read-file-name "Save to directory: " nil nil t)
+   (list (read-string "Save parts of type: " 
+		      (or (car gnus-summary-save-parts-type-history)
+			  gnus-summary-save-parts-default-mime)
+		      'gnus-summary-save-parts-type-history)
+	 (setq gnus-summary-save-parts-last-directory
+	       (read-file-name "Save to directory: " 
+			       gnus-summary-save-parts-last-directory
+			       nil t))
 	 current-prefix-arg))
   (gnus-summary-iterate n
     (let ((gnus-display-mime-function nil)