From 7536896443358102f9fc59387d7143f80a098ab1 Mon Sep 17 00:00:00 2001 From: ueno Date: Mon, 8 Nov 1999 05:50:17 +0000 Subject: [PATCH] (pop3-progress-message): New function. (pop3-movemail): Use it. --- lisp/pop3.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/pop3.el b/lisp/pop3.el index 4962033..9a6c680 100644 --- a/lisp/pop3.el +++ b/lisp/pop3.el @@ -93,6 +93,9 @@ Nil means no, t means yes, not-nil-or-t means yet to be determined.") '("-quiet") "Arguments to be passed to the program `pop3-ssl-program-name'.") +(defun pop3-progress-message (format percent &rest args) + (apply (function message) format args)) + (defun pop3-movemail (&optional crashbox) "Transfer contents of a maildrop to the specified CRASHBOX." (or crashbox (setq crashbox (expand-file-name "~/.crashbox"))) @@ -126,9 +129,10 @@ Nil means no, t means yes, not-nil-or-t means yet to be determined.") (unwind-protect (unless (not (stringp crashbox)) (while messages - (message - (format "Retrieving message %d of %d (%d octets) from %s..." - n message-count (cdar messages) pop3-mailhost)) + (pop3-progress-message + "Retrieving message %d of %d (%d octets) from %s..." + (floor (* (/ (float n) message-count) 100)) + n message-count (cdar messages) pop3-mailhost) (pop3-retr process (caar messages) crashbuf) (push (caar messages) retrieved-messages) (setq messages (cdr messages) -- 1.7.10.4