diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-05-30 14:23:47 -0300 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-05-30 14:23:47 -0300 |
commit | 1257e75502973fcdf4c2bbedaad4df0240171071 (patch) | |
tree | 9906db3ad074324f0b4c53ec6fa3fa7cbbdf8d2f /lisp/mail/smtpmail.el | |
parent | 7a54264e4cf842b5546ed2d3ba7c2a87f7397f84 (diff) | |
download | emacs-1257e75502973fcdf4c2bbedaad4df0240171071.tar.gz |
* lisp/mail/smtpmail.el (smtpmail-send-data): Add progress reporter.
Diffstat (limited to 'lisp/mail/smtpmail.el')
-rw-r--r-- | lisp/mail/smtpmail.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 3eda3503adc..bc1ca77d24a 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -943,15 +943,20 @@ The list is in preference order.") (process-send-string process "\r\n")) (defun smtpmail-send-data (process buffer) - (let ((data-continue t) sending-data) + (let ((data-continue t) sending-data + (pr (with-current-buffer buffer + (make-progress-reporter "Sending email" + (point-min) (point-max))))) (with-current-buffer buffer (goto-char (point-min))) (while data-continue (with-current-buffer buffer + (progress-reporter-update pr (point)) (setq sending-data (buffer-substring (point-at-bol) (point-at-eol))) (end-of-line 2) (setq data-continue (not (eobp)))) - (smtpmail-send-data-1 process sending-data)))) + (smtpmail-send-data-1 process sending-data)) + (progress-reporter-done pr))) (defun smtpmail-deduce-address-list (smtpmail-text-buffer header-start header-end) "Get address list suitable for smtp RCPT TO: <address>." |