Commit 00591a8e authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen
Browse files

Make C-u C-x m work with Message as documented

* lisp/gnus/message.el (message-mail): Respect the CONTINUE
parameter (bug#17175).
parent 82b6b3cf
......@@ -6644,29 +6644,27 @@ OTHER-HEADERS is an alist of header/value pairs. CONTINUE says whether
to continue editing a message already being composed. SWITCH-FUNCTION
is a function used to switch to and display the mail buffer."
(interactive)
(let ((message-this-is-mail t))
(unless (message-mail-user-agent)
(message-pop-to-buffer
;; Search for the existing message buffer if `continue' is non-nil.
(let ((message-generate-new-buffers
(when (or (not continue)
(eq message-generate-new-buffers 'standard)
(functionp message-generate-new-buffers))
message-generate-new-buffers)))
(message-buffer-name "mail" to))
switch-function))
(message-setup
(nconc
`((To . ,(or to "")) (Subject . ,(or subject "")))
;; C-h f compose-mail says that headers should be specified as
;; (string . value); however all the rest of message expects
;; headers to be symbols, not strings (eg message-header-format-alist).
;; http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg00337.html
;; We need to convert any string input, eg from rmail-start-mail.
(dolist (h other-headers other-headers)
(if (stringp (car h)) (setcar h (intern (capitalize (car h)))))))
yank-action send-actions continue switch-function
return-action)))
(let ((message-this-is-mail t)
message-buffers)
;; Search for the existing message buffer if `continue' is non-nil.
(if (and continue
(setq message-buffers (message-buffers)))
(pop-to-buffer (car message-buffers))
;; Start a new buffer.
(unless (message-mail-user-agent)
(message-pop-to-buffer (message-buffer-name "mail" to) switch-function))
(message-setup
(nconc
`((To . ,(or to "")) (Subject . ,(or subject "")))
;; C-h f compose-mail says that headers should be specified as
;; (string . value); however all the rest of message expects
;; headers to be symbols, not strings (eg message-header-format-alist).
;; http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg00337.html
;; We need to convert any string input, eg from rmail-start-mail.
(dolist (h other-headers other-headers)
(if (stringp (car h)) (setcar h (intern (capitalize (car h)))))))
yank-action send-actions continue switch-function
return-action))))
;;;###autoload
(defun message-news (&optional newsgroups subject)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment