diff options
Diffstat (limited to 'lisp/gnus/message.el')
-rw-r--r-- | lisp/gnus/message.el | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 5d82faee20d..ee9d4992158 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4507,7 +4507,8 @@ This function could be useful in `message-setup-hook'." (boundp 'gnus-group-posting-charset-alist)) (gnus-setup-posting-charset nil) message-posting-charset)) - (headers message-required-mail-headers)) + (headers message-required-mail-headers) + options) (when (and message-generate-hashcash (not (eq message-generate-hashcash 'opportunistic))) (message "Generating hashcash...") @@ -4546,9 +4547,11 @@ This function could be useful in `message-setup-hook'." (error "Failed to send the message"))))) ;; Let the user do all of the above. (run-hooks 'message-header-hook)) + (setq options message-options) (unwind-protect (with-current-buffer tembuf (erase-buffer) + (setq message-options options) ;; Avoid copying text props (except hard newlines). (insert (with-current-buffer mailbuf (mml-buffer-substring-no-properties-except-hard-newlines @@ -4630,9 +4633,11 @@ If you always want Gnus to send messages in one piece, set (message "Sending via mail...") (funcall (or message-send-mail-real-function message-send-mail-function))) - (message-send-mail-partially))) + (message-send-mail-partially)) + (setq options message-options)) (kill-buffer tembuf)) (set-buffer mailbuf) + (setq message-options options) (push 'mail message-sent-message-via))) (defvar sendmail-program) @@ -6322,6 +6327,7 @@ between beginning of field and beginning of line." (defun message-pop-to-buffer (name &optional switch-function) "Pop to buffer NAME, and warn if it already exists and is modified." + (unless switch-function (setq switch-function #'pop-to-buffer)) (let ((buffer (get-buffer name))) (if (and buffer (buffer-name buffer)) @@ -6331,7 +6337,7 @@ between beginning of field and beginning of line." (progn (gnus-select-frame-set-input-focus (window-frame window)) (select-window window)) - (funcall (or switch-function 'switch-to-buffer) buffer) + (funcall switch-function buffer) (set-buffer buffer)) (when (and (buffer-modified-p) (not (prog1 @@ -6339,7 +6345,7 @@ between beginning of field and beginning of line." "Message already being composed; erase? ") (message nil)))) (error "Message being composed"))) - (funcall (or switch-function 'switch-to-buffer) name) + (funcall switch-function name) (set-buffer name)) (erase-buffer) (message-mode))) |