]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-summary-output): Simplify. Make prefix arg work right.
authorMarkus Rost <rost@math.uni-bielefeld.de>
Tue, 8 Dec 1998 15:48:11 +0000 (15:48 +0000)
committerMarkus Rost <rost@math.uni-bielefeld.de>
Tue, 8 Dec 1998 15:48:11 +0000 (15:48 +0000)
lisp/mail/rmailsum.el

index 42cdbbb384f206a744b3bd7f3013bc95d89b5b31..cd289c0df24d2e92fc3a98146e3134af9e50dc23 100644 (file)
@@ -1483,15 +1483,16 @@ The variables `rmail-secondary-file-directory' and
   (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)))