Synch with Oort Gnus.
[elisp/gnus.git-] / lisp / gnus-agent.el
index e9d3f53..c8b7792 100644 (file)
@@ -366,14 +366,16 @@ last form in your `.gnus.el' file:
 \(gnus-agentize)
 
 This will modify the `gnus-setup-news-hook', and
-`message-send-mail-function' variables, and install the Gnus agent
+`message-send-mail-real-function' variables, and install the Gnus agent
 minor mode in all Gnus buffers."
   (interactive)
   (gnus-open-agent)
   (add-hook 'gnus-setup-news-hook 'gnus-agent-queue-setup)
   (unless gnus-agent-send-mail-function
-    (setq gnus-agent-send-mail-function message-send-mail-function
-         message-send-mail-function 'gnus-agent-send-mail))
+    (setq gnus-agent-send-mail-function (or 
+                                         message-send-mail-real-function
+                                         message-send-mail-function)
+         message-send-mail-real-function 'gnus-agent-send-mail))
   (unless gnus-agent-covered-methods
     (setq gnus-agent-covered-methods (list gnus-select-method))))
 
@@ -1069,7 +1071,8 @@ the actual number of articles toggled is returned."
 (defun gnus-agent-save-alist (group &optional articles state dir)
   "Save the article-state alist for GROUP."
   (let ((file-name-coding-system nnmail-pathname-coding-system)
-       (pathname-coding-system nnmail-pathname-coding-system))
+       (pathname-coding-system nnmail-pathname-coding-system)
+       print-level print-length)
     (with-temp-file (if dir
                        (expand-file-name ".agentview" dir)
                      (gnus-agent-article-name ".agentview" group))