# HG changeset patch # User Stefan Monnier # Date 1227306414 0 # Node ID b1be79c8e9458230204e306a699c8bbcdecdbd8b # Parent 46cd7381c2ff036f1eea61ad49abff1e4e4ef5f0 (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. diff -r 46cd7381c2ff -r b1be79c8e945 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Fri Nov 21 22:17:42 2008 +0000 +++ b/lisp/gnus/ChangeLog Fri Nov 21 22:26:54 2008 +0000 @@ -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 -r 46cd7381c2ff -r b1be79c8e945 lisp/gnus/message.el --- a/lisp/gnus/message.el Fri Nov 21 22:17:42 2008 +0000 +++ b/lisp/gnus/message.el Fri Nov 21 22:26:54 2008 +0000 @@ -4325,9 +4325,8 @@ (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 @@ (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 @@ 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)))