diff options
| author | Dave Love | 2000-11-06 23:39:09 +0000 |
|---|---|---|
| committer | Dave Love | 2000-11-06 23:39:09 +0000 |
| commit | 0342aa5b20159d87c1da30718d0ac74e7b98fabf (patch) | |
| tree | 79480e7a65168042942da7dee955ffebcf89b10f | |
| parent | d8cc10e1d78e56a39958d83d8036afee2e01940e (diff) | |
| download | emacs-0342aa5b20159d87c1da30718d0ac74e7b98fabf.tar.gz emacs-0342aa5b20159d87c1da30718d0ac74e7b98fabf.zip | |
2000-11-06 ShengHuo ZHU <zsh@cs.rochester.edu>
* gnus-msg.el (gnus-inews-group-method): New function.
(gnus-inews-do-gcc): Use it.
*gnus-msg.el: (gnus-inews-add-send-actions): Use
`gnus-agent-possibly-do-gcc' if Agentized.
(gnus-inews-add-send-actions): Add `gnus-agent-possibly-save-gcc'
to `message-header-hook'.
| -rw-r--r-- | lisp/gnus/gnus-msg.el | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 7f80f8ea049..700a581486d 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> | 5 | ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> |
| 6 | ;; Lars Magne Ingebrigtsen <larsi@gnus.org> | 6 | ;; Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 7 | ;; Maintainer: bugs@gnus.org | ||
| 7 | ;; Keywords: news | 8 | ;; Keywords: news |
| 8 | 9 | ||
| 9 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| @@ -276,7 +277,11 @@ the Gcc: header for archiving purposes." | |||
| 276 | 277 | ||
| 277 | (defun gnus-inews-add-send-actions (winconf buffer article) | 278 | (defun gnus-inews-add-send-actions (winconf buffer article) |
| 278 | (make-local-hook 'message-sent-hook) | 279 | (make-local-hook 'message-sent-hook) |
| 279 | (add-hook 'message-sent-hook 'gnus-inews-do-gcc nil t) | 280 | (add-hook 'message-sent-hook (if gnus-agent 'gnus-agent-possibly-do-gcc |
| 281 | 'gnus-inews-do-gcc) nil t) | ||
| 282 | (when gnus-agent | ||
| 283 | (make-local-hook 'message-header-hook) | ||
| 284 | (add-hook 'message-header-hook 'gnus-agent-possibly-save-gcc nil t)) | ||
| 280 | (setq message-post-method | 285 | (setq message-post-method |
| 281 | `(lambda (arg) | 286 | `(lambda (arg) |
| 282 | (gnus-post-method arg ,gnus-newsgroup-name))) | 287 | (gnus-post-method arg ,gnus-newsgroup-name))) |
| @@ -1037,6 +1042,21 @@ this is a reply." | |||
| 1037 | 1042 | ||
| 1038 | ;;; Gcc handling. | 1043 | ;;; Gcc handling. |
| 1039 | 1044 | ||
| 1045 | (defun gnus-inews-group-method (group) | ||
| 1046 | (cond ((and (null (gnus-get-info group)) | ||
| 1047 | (eq (car gnus-message-archive-method) | ||
| 1048 | (car | ||
| 1049 | (gnus-server-to-method | ||
| 1050 | (gnus-group-method group))))) | ||
| 1051 | ;; If the group doesn't exist, we assume | ||
| 1052 | ;; it's an archive group... | ||
| 1053 | gnus-message-archive-method) | ||
| 1054 | ;; Use the method. | ||
| 1055 | ((gnus-info-method (gnus-get-info group)) | ||
| 1056 | (gnus-info-method (gnus-get-info group))) | ||
| 1057 | ;; Find the method. | ||
| 1058 | (t (gnus-group-method group)))) | ||
| 1059 | |||
| 1040 | ;; Do Gcc handling, which copied the message over to some group. | 1060 | ;; Do Gcc handling, which copied the message over to some group. |
| 1041 | (defun gnus-inews-do-gcc (&optional gcc) | 1061 | (defun gnus-inews-do-gcc (&optional gcc) |
| 1042 | (interactive) | 1062 | (interactive) |
| @@ -1055,21 +1075,7 @@ this is a reply." | |||
| 1055 | ;; Copy the article over to some group(s). | 1075 | ;; Copy the article over to some group(s). |
| 1056 | (while (setq group (pop groups)) | 1076 | (while (setq group (pop groups)) |
| 1057 | (gnus-check-server | 1077 | (gnus-check-server |
| 1058 | (setq method | 1078 | (setq method (gnus-inews-group-method group))) |
| 1059 | (cond ((and (null (gnus-get-info group)) | ||
| 1060 | (eq (car gnus-message-archive-method) | ||
| 1061 | (car | ||
| 1062 | (gnus-server-to-method | ||
| 1063 | (gnus-group-method group))))) | ||
| 1064 | ;; If the group doesn't exist, we assume | ||
| 1065 | ;; it's an archive group... | ||
| 1066 | gnus-message-archive-method) | ||
| 1067 | ;; Use the method. | ||
| 1068 | ((gnus-info-method (gnus-get-info group)) | ||
| 1069 | (gnus-info-method (gnus-get-info group))) | ||
| 1070 | ;; Find the method. | ||
| 1071 | (t (gnus-group-method group))))) | ||
| 1072 | (gnus-check-server method) | ||
| 1073 | (unless (gnus-request-group group t method) | 1079 | (unless (gnus-request-group group t method) |
| 1074 | (gnus-request-create-group group method)) | 1080 | (gnus-request-create-group group method)) |
| 1075 | (save-excursion | 1081 | (save-excursion |