From: morioka Date: Sun, 3 May 1998 10:50:25 +0000 (+0000) Subject: Sync up with Gnus v5.6.9. X-Git-Tag: gnus-6_7-tomo-199811302358~33 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=cb93677a305566df76db0b877a365e4231743019;p=elisp%2Fgnus.git- Sync up with Gnus v5.6.9. --- diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index f27161a..a9a1f4f 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -77,6 +77,8 @@ If nil, only read articles will be expired." ;;; Internal variables +(defvar gnus-agent-meta-information-header "X-Gnus-Agent-Meta-Information") + (defvar gnus-agent-history-buffers nil) (defvar gnus-agent-buffer-alist nil) (defvar gnus-agent-article-alist nil) @@ -330,8 +332,23 @@ agent minor mode in all Gnus buffers." (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) (replace-match "\n") + (gnus-agent-insert-meta-information 'mail) (gnus-request-accept-article "nndraft:queue"))) +(defun gnus-agent-insert-meta-information (type &optional method) + "Insert meta-information into the message that says how it's to be posted. +TYPE can be either `mail' or `news'. If the latter METHOD can +be a select method." + (save-excursion + (message-remove-header gnus-agent-meta-information-header) + (goto-char (point-min)) + (insert gnus-agent-meta-information-header ": " + (symbol-name type) " " (format "%S" method) + "\n") + (forward-char -1) + (while (search-backward "\n" nil t) + (replace-match "\\n" t t)))) + ;;; ;;; Group mode commands ;;; @@ -1257,6 +1274,7 @@ The following commands are available: (set-buffer (setq gnus-agent-current-history (setq history (gnus-agent-history-buffer)))) + (goto-char (point-min)) (unless (zerop (buffer-size)) (goto-char (point-min)) (while (not (eobp)) diff --git a/lisp/gnus-draft.el b/lisp/gnus-draft.el index f5e5d6c..7b7c6fb 100644 --- a/lisp/gnus-draft.el +++ b/lisp/gnus-draft.el @@ -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." diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 78f3cbf..824c191 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -487,7 +487,8 @@ If SILENT, don't prompt the user." (cons (or gnus-last-posting-server "") 0)))) method-alist)))) ;; Override normal method. - ((eq gnus-post-method 'current) + ((and (eq gnus-post-method 'current) + (not arg)) group-method) (gnus-post-method gnus-post-method) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index bf0ee86..cbcc92e 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -3245,6 +3245,11 @@ If NO-DISPLAY, don't generate a summary buffer." ;; If we use dummy roots, then we have to remove the ;; dummy root as well. (when (eq gnus-summary-make-false-root 'dummy) + ;; We go to the dummy root by going to + ;; the first sub-"thread", and then one line up. + (gnus-summary-goto-article + (mail-header-number (caadr thread))) + (forward-line -1) (gnus-delete-line) (gnus-data-compute-positions)) (setq thread (cdr thread))