From 8a98686533cee6c106f4be0a71d3439ea7f3ae1f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 21 Nov 2008 22:26:54 +0000 Subject: [PATCH] (message-send-mail): Just set the buffer to unibyte rather than use mm-with-unibyte-current-buffer which does a lot more. (message-send-mail-partially): Don't bother with mm-with-unibyte-current-buffer since it's already been made unibyte by message-send-mail. --- lisp/gnus/ChangeLog | 8 ++++++++ lisp/gnus/message.el | 12 ++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 09b14d643e..b9ebd92e68 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,11 @@ +2008-11-21 Stefan Monnier + + * message.el (message-send-mail): Just set the buffer to unibyte + rather than use mm-with-unibyte-current-buffer which does a lot more. + (message-send-mail-partially): Don't bother with + mm-with-unibyte-current-buffer since it's already been made unibyte by + message-send-mail. + 2008-11-11 Teodor Zlatanov * nnrss.el (nnrss-make-hash-index): Debug message of full item. diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 403cc54957..fde3f5a5f1 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4325,9 +4325,8 @@ This function could be useful in `message-setup-hook'." (end-of-line) (insert (format " (%d/%d)" n total)) (widen) - (mm-with-unibyte-current-buffer - (funcall (or message-send-mail-real-function - message-send-mail-function)))) + (funcall (or message-send-mail-real-function + message-send-mail-function))) (setq n (+ n 1)) (setq p (pop plist)) (erase-buffer))) @@ -4429,6 +4428,11 @@ This function could be useful in `message-setup-hook'." (message-fetch-field "content-transfer-encoding"))))))) (message-insert-courtesy-copy)) + ;; Let's make sure we encoded all the body. + (assert (save-excursion + (goto-char (point-min)) + (not (re-search-forward "[^\000-\377]" nil t)))) + (mm-disable-multibyte) (if (or (not message-send-mail-partially-limit) (< (buffer-size) message-send-mail-partially-limit) (not (message-y-or-n-p @@ -4453,7 +4457,7 @@ The size limit is controlled by `message-send-mail-partially-limit'. If you always want Gnus to send messages in one piece, set `message-send-mail-partially-limit' to nil. "))) - (mm-with-unibyte-current-buffer + (progn (message "Sending via mail...") (funcall (or message-send-mail-real-function message-send-mail-function))) -- 2.20.1