changeset 4266:5a7266ff9af1

(unrmail): Total rewrite.
author Richard M. Stallman <rms@gnu.org>
date Sun, 25 Jul 1993 02:19:59 +0000
parents 2812d8619305
children aabcab2eab73
files lisp/mail/unrmail.el
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/unrmail.el	Sun Jul 25 02:19:47 1993 +0000
+++ b/lisp/mail/unrmail.el	Sun Jul 25 02:19:59 1993 +0000
@@ -46,11 +46,15 @@
 ;;;###autoload
 (defun unrmail (file to-file)
   "Convert Rmail file FILE to mailbox-format file TO-FILE."
-  (interactive "fUnrmail (rmail file): \nfUnrmail into (new mailbox file): ")
-  (let ((message-count 0))
+  (interactive "fUnrmail (rmail file): \nFUnrmail into (new mailbox file): ")
+  (let ((message-count 0)
+	(rmail-delete-after-output nil))
     (rmail file)
-    (rmail-show-message 1)
-    (while (not (rmail-output to-file))
-      (setq message-count (1+ message-count)))))
+    (message "Writing messages to %s..." to-file)
+    (while (< message-count rmail-total-messages)
+      (rmail-show-message
+       (setq message-count (1+ message-count)))
+      (rmail-output to-file 1 t))
+    (message "Writing messages to %s...done" to-file)))
 
 ;;; unrmail.el ends here