changeset 23831:67267b9864ed

(rmail-summary-output): Simplify. Make prefix arg work right.
author Markus Rost <rost@math.uni-bielefeld.de>
date Tue, 08 Dec 1998 15:48:11 +0000
parents e532573faa40
children da77f7e4d272
files lisp/mail/rmailsum.el
diffstat 1 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailsum.el	Tue Dec 08 15:34:14 1998 +0000
+++ b/lisp/mail/rmailsum.el	Tue Dec 08 15:48:11 1998 +0000
@@ -1483,15 +1483,16 @@
   (if rmail-delete-after-output
       (rmail-summary-delete-forward nil)))
 
-(defun rmail-summary-output ()
-  "Append this message to Unix mail file named FILE-NAME."
+(defun rmail-summary-output (&optional file-name)
+  "Append this message to Unix mail file named FILE-NAME.
+
+A prefix argument N says to output N consecutive messages
+starting with the current one.  Deleted messages are skipped and don't count."
   (interactive)
-  (save-excursion
-    (set-buffer rmail-buffer)
-    (let ((rmail-delete-after-output nil))
-      (call-interactively 'rmail-output)))
-  (if rmail-delete-after-output
-      (rmail-summary-delete-forward nil)))
+  (with-current-buffer rmail-buffer
+    (if file-name
+	(rmail-output file-name)
+      (call-interactively 'rmail-output))))
 
 (defun rmail-summary-construct-io-menu ()
   (let ((files (rmail-find-all-files rmail-secondary-file-directory)))