+ (interactive
+ (let ((prefix-arg current-prefix-arg)
+ articles marks default-folder)
+ (setq default-folder (or (car vm-folder-history) vm-primary-inbox))
+ (if (numberp prefix-arg)
+ (setq articles prefix-arg)
+ (setq marks (delq nil (gnus-summary-work-articles nil))
+ articles (length marks)))
+ (list
+ prefix-arg
+ (unless (zerop articles)
+ (read-file-name
+ (format
+ "Save %s in VM folder: "
+ (cond ((eq 1 articles)
+ (if (or (not marks) (eq gnus-current-article (car marks)))
+ "this article"
+ "the marked article"))
+ ((< 0 articles)
+ (if marks
+ (format "the marked %d articles" articles)
+ (format "the %d next articles" articles)))
+ ((> 0 articles)
+ (format "the %d previous articles" (- articles)))))
+ (if default-folder "" vm-folder-directory)
+ nil nil default-folder 'vm-folder-history)))))
+ (if (interactive-p)
+ (unless folder
+ (error "No articles to be saved"))
+ (unless (setq folder (or folder gnus-summary-save-article-vm-folder))
+ (error "No VM folder is specified")))
+ (unwind-protect
+ (progn
+ (setq gnus-summary-save-article-vm-folder folder
+ gnus-summary-save-article-vm-count 0)
+ (let ((gnus-default-article-saver 'gnus-summary-save-in-vm)
+ mime-display-header-hook mime-display-text/plain-hook
+ mime-text-decode-hook mime-view-define-keymap-hook
+ mime-view-mode-hook)
+ (gnus-summary-save-article arg))
+ (cond ((eq 1 gnus-summary-save-article-vm-count)
+ (message "One article is saved in %s" folder))
+ ((< 0 gnus-summary-save-article-vm-count)
+ (message "%d articles are saved in %s"
+ gnus-summary-save-article-vm-count folder))
+ (t
+ (message "Maybe no articles are saved in %s" folder))))
+ (setq gnus-summary-save-article-vm-folder nil
+ gnus-summary-save-article-vm-count nil)))