X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fgnus-draft.el;h=fce8744e2426ede31f800b181624ee4be3375d08;hb=4dd18c1acb188e71a04e5bcf9df7df7a453ff2eb;hp=f5e5d6c4fbdfb744cea54f1744c82e21d43926b6;hpb=2cd4287e4cad6a480ed93acffc6e91e268ef596f;p=elisp%2Fgnus.git- diff --git a/lisp/gnus-draft.el b/lisp/gnus-draft.el index f5e5d6c..fce8744 100644 --- a/lisp/gnus-draft.el +++ b/lisp/gnus-draft.el @@ -1,7 +1,7 @@ ;;; gnus-draft.el --- draft message support for Semi-gnus ;; Copyright (C) 1997,98 Free Software Foundation, Inc. -;; Author: Lars Magne Ingebrigtsen +;; Author: Lars Magne Ingebrigtsen ;; MORIOKA Tomohiko ;; Keywords: mail, news, MIME, offline @@ -31,6 +31,7 @@ (require 'message) (require 'gnus-msg) (require 'nndraft) +(require 'gnus-agent) (eval-when-compile (require 'cl)) ;;; Draft minor mode @@ -118,8 +119,26 @@ "Send message ARTICLE." (gnus-draft-setup article (or group "nndraft:queue")) (let ((message-syntax-checks 'dont-check-for-anything-just-trust-me) - message-send-hook) - (message-send-and-exit))) + message-send-hook type method) + ;; We read the meta-information that says how and where + ;; this message is to be sent. + (save-restriction + (message-narrow-to-head) + (when (re-search-forward + (concat "^" (regexp-quote gnus-agent-meta-information-header) ":") + nil t) + (setq type (ignore-errors (read (current-buffer))) + method (ignore-errors (read (current-buffer)))) + (message-remove-header gnus-agent-meta-information-header))) + ;; Then we send it. If we have no meta-information, we just send + ;; it and let Message figure out how. + (if type + (let ((message-this-is-news (eq type 'news)) + (message-this-is-mail (eq type 'mail)) + (gnus-post-method method) + (message-post-method method)) + (message-send-and-exit)) + (message-send-and-exit)))) (defun gnus-draft-send-all-messages () "Send all the sendable drafts."