changeset 24849:0e79d47f61d6

(rmail-summary-output-to-rmail-file): Avoid multiple output of the last message.
author Karl Heuer <kwzh@gnu.org>
date Tue, 15 Jun 1999 05:35:56 +0000
parents ca34063731fc
children c3ad4583628b
files lisp/mail/rmailsum.el
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailsum.el	Tue Jun 15 05:31:37 1999 +0000
+++ b/lisp/mail/rmailsum.el	Tue Jun 15 05:35:56 1999 +0000
@@ -1468,10 +1468,15 @@
    (progn (require 'rmailout)
 	  (list (rmail-output-read-rmail-file-name)
 		(prefix-numeric-value current-prefix-arg))))
-  (let ((i 0))
-    (while (< i n)
+  (let ((i 0) prev-msg)
+    (while 
+	(and (< i n)
+	     (progn (rmail-summary-goto-msg)
+		    (not (eq prev-msg
+			     (setq prev-msg
+				   (with-current-buffer rmail-buffer 
+				     rmail-current-message))))))
       (setq i (1+ i))
-      (rmail-summary-goto-msg)
       (with-current-buffer rmail-buffer
 	(let ((rmail-delete-after-output nil))
 	  (rmail-output-to-rmail-file file-name 1)))