aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2011-05-30 14:23:47 -0300
committerStefan Monnier2011-05-30 14:23:47 -0300
commit1257e75502973fcdf4c2bbedaad4df0240171071 (patch)
tree9906db3ad074324f0b4c53ec6fa3fa7cbbdf8d2f
parent7a54264e4cf842b5546ed2d3ba7c2a87f7397f84 (diff)
downloademacs-1257e75502973fcdf4c2bbedaad4df0240171071.tar.gz
emacs-1257e75502973fcdf4c2bbedaad4df0240171071.zip
* lisp/mail/smtpmail.el (smtpmail-send-data): Add progress reporter.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/mail/smtpmail.el9
2 files changed, 11 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0064bb79544..badff5cbd6c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12011-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * mail/smtpmail.el (smtpmail-send-data): Add progress reporter.
4
12011-05-30 Leo Liu <sdl.web@gmail.com> 52011-05-30 Leo Liu <sdl.web@gmail.com>
2 6
3 * net/rcirc.el (rcirc-debug-buffer): Use visible buffer name. 7 * net/rcirc.el (rcirc-debug-buffer): Use visible buffer name.
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.")
943 (process-send-string process "\r\n")) 943 (process-send-string process "\r\n"))
944 944
945(defun smtpmail-send-data (process buffer) 945(defun smtpmail-send-data (process buffer)
946 (let ((data-continue t) sending-data) 946 (let ((data-continue t) sending-data
947 (pr (with-current-buffer buffer
948 (make-progress-reporter "Sending email"
949 (point-min) (point-max)))))
947 (with-current-buffer buffer 950 (with-current-buffer buffer
948 (goto-char (point-min))) 951 (goto-char (point-min)))
949 (while data-continue 952 (while data-continue
950 (with-current-buffer buffer 953 (with-current-buffer buffer
954 (progress-reporter-update pr (point))
951 (setq sending-data (buffer-substring (point-at-bol) (point-at-eol))) 955 (setq sending-data (buffer-substring (point-at-bol) (point-at-eol)))
952 (end-of-line 2) 956 (end-of-line 2)
953 (setq data-continue (not (eobp)))) 957 (setq data-continue (not (eobp))))
954 (smtpmail-send-data-1 process sending-data)))) 958 (smtpmail-send-data-1 process sending-data))
959 (progress-reporter-done pr)))
955 960
956(defun smtpmail-deduce-address-list (smtpmail-text-buffer header-start header-end) 961(defun smtpmail-deduce-address-list (smtpmail-text-buffer header-start header-end)
957 "Get address list suitable for smtp RCPT TO: <address>." 962 "Get address list suitable for smtp RCPT TO: <address>."