From: yamaoka Date: Mon, 2 Oct 2000 01:54:54 +0000 (+0000) Subject: Synch with Gnus. X-Git-Tag: t-gnus-6_14-quimby-before-installer-changed-~74 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d10503c42365afa537aa92231946fcd415933eb;p=elisp%2Fgnus.git- Synch with Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 90b5562..c8d97ce 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2000-10-01 20:55:53 ShengHuo ZHU + + Don't postpone GCC if none of GCC methods is agent-covered. This + fix presumes that the post-method must be agent-covered if any Gcc + method is agent-covered. + + * gnus-msg.el (gnus-inews-group-method): New function. + (gnus-inews-do-gcc): Use it. + * gnus-agent.el (gnus-agent-any-covered-gcc): New function. + (gnus-agent-possibly-save-gcc): Use it. + (gnus-agent-possibly-do-gcc): Ditto. + 2000-10-01 17:08:50 ShengHuo ZHU * mailcap.el (mailcap-mime-types): Use mailcap-mime-data. diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 2ac606d..14aa91e 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -397,9 +397,25 @@ be a select method." (while (re-search-forward (concat gnus-agent-gcc-header ":") nil t) (replace-match "Gcc:" 'fixedcase)))) +(defun gnus-agent-any-covered-gcc () + (save-restriction + (message-narrow-to-headers) + (let* ((gcc (mail-fetch-field "gcc" nil t)) + (methods (and gcc + (mapcar 'gnus-inews-group-method + (message-unquote-tokens + (message-tokenize-header + gcc " ,"))))) + covered) + (while (and (not covered) methods) + (setq covered + (member (car methods) gnus-agent-covered-methods) + methods (cdr methods))) + covered))) + (defun gnus-agent-possibly-save-gcc () "Save GCC if Gnus is unplugged." - (unless gnus-plugged + (when (and (not gnus-plugged) (gnus-agent-any-covered-gcc)) (save-excursion (goto-char (point-min)) (let ((case-fold-search t)) @@ -408,7 +424,7 @@ be a select method." (defun gnus-agent-possibly-do-gcc () "Do GCC if Gnus is plugged." - (when gnus-plugged + (when (or gnus-plugged (not (gnus-agent-any-covered-gcc))) (gnus-inews-do-gcc))) ;;; diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 5abdd23..93ce9ce 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -1128,6 +1128,21 @@ this is a reply." ;;; Gcc handling. +(defun gnus-inews-group-method (group) + (cond ((and (null (gnus-get-info group)) + (eq (car gnus-message-archive-method) + (car + (gnus-server-to-method + (gnus-group-method group))))) + ;; If the group doesn't exist, we assume + ;; it's an archive group... + gnus-message-archive-method) + ;; Use the method. + ((gnus-info-method (gnus-get-info group)) + (gnus-info-method (gnus-get-info group))) + ;; Find the method. + (t (gnus-group-method group)))) + ;; Do Gcc handling, which copied the message over to some group. (defun gnus-inews-do-gcc (&optional gcc) (interactive) @@ -1147,21 +1162,7 @@ this is a reply." ;; Copy the article over to some group(s). (while (setq group (pop groups)) (gnus-check-server - (setq method - (cond ((and (null (gnus-get-info group)) - (eq (car gnus-message-archive-method) - (car - (gnus-server-to-method - (gnus-group-method group))))) - ;; If the group doesn't exist, we assume - ;; it's an archive group... - gnus-message-archive-method) - ;; Use the method. - ((gnus-info-method (gnus-get-info group)) - (gnus-info-method (gnus-get-info group))) - ;; Find the method. - (t (gnus-group-method group))))) - (gnus-check-server method) + (setq method (gnus-inews-group-method group))) (unless (gnus-request-group group t method) (gnus-request-create-group group method)) (save-excursion