]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-summary-output-to-rmail-file): Avoid
authorKarl Heuer <kwzh@gnu.org>
Tue, 15 Jun 1999 05:35:56 +0000 (05:35 +0000)
committerKarl Heuer <kwzh@gnu.org>
Tue, 15 Jun 1999 05:35:56 +0000 (05:35 +0000)
multiple output of the last message.

lisp/mail/rmailsum.el

index 1e1d23f53513fd82efd651875fbf4aaf51bdb693..57b611f766706874a9f534d873035f786abd71fc 100644 (file)
@@ -1468,10 +1468,15 @@ starting with the current one.  Deleted messages are skipped and don't count."
    (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)))