Save save-parts history.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Thu, 14 Sep 2000 17:53:03 +0000 (17:53 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Thu, 14 Sep 2000 17:53:03 +0000 (17:53 +0000)
lisp/ChangeLog
lisp/gnus-sum.el

index f72dab1..ca541bf 100644 (file)
@@ -1,3 +1,15 @@
+2000-09-14 14:48:57  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-sum.el (gnus-summary-save-parts-type-history): New.
+       (gnus-summary-save-parts-last-directory): New.
+       (gnus-summary-save-parts): Save history.
+
+2000-09-14 Ben Gertzfield <che@debian.org>
+
+       * gnus-sum.el (gnus-summary-save-parts-default-mime): New
+       variable.
+       (gnus-summary-save-parts): Use it.
+
 2000-09-14 11:31:28  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-art.el (gnus-article-setup-buffer): Clean handle-alist.
index 52d93cb..40b24e2 100644 (file)
@@ -885,6 +885,14 @@ For example: ((1 . cn-gb-2312) (2 . big5))."
   :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 @@ For example: ((1 . cn-gb-2312) (2 . big5))."
 (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)
@@ -9195,8 +9206,14 @@ save those articles instead."
   "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)