Synch to Oort Gnus 200303240302.
[elisp/gnus.git-] / lisp / gnus-int.el
index aa90e6a..835cb91 100644 (file)
@@ -50,7 +50,7 @@ server denied."
   :group 'gnus-start
   :type '(choice (const :tag "Ask" nil)
                 (const :tag "Deny server" denied)
-                (const :tag "Unplugg Agent" offline)))
+                (const :tag "Unplug Agent" offline)))
 
 (defvar gnus-internal-registry-spool-current-method nil
   "The current method, for the registry.")
@@ -203,12 +203,17 @@ If it is down, start it up (again)."
          nil)
       ;; Open the server.
       (let ((result
-            (condition-case ()
+            (condition-case err
                 (funcall (gnus-get-function gnus-command-method 'open-server)
                          (nth 1 gnus-command-method)
                          (nthcdr 2 gnus-command-method))
+               (error 
+                (gnus-message 1 (format 
+                                 "Unable to open server due to: %s"
+                                 (error-message-string err)))
+                nil)
               (quit
-               (message "Quit trying to open server")
+               (gnus-message 1 "Quit trying to open server")
                nil))))
        ;; If this hasn't been opened before, we add it to the list.
        (unless elem
@@ -348,7 +353,7 @@ If FETCH-OLD, retrieve all headers (or some subset thereof) in the group."
     (cond
      ((and gnus-use-cache (numberp (car articles)))
       (gnus-cache-retrieve-headers articles group fetch-old))
-     ((and gnus-agent gnus-agent-cache (gnus-online gnus-command-method)
+     ((and gnus-agent (gnus-online gnus-command-method)
           (gnus-agent-method-p gnus-command-method))
       (gnus-agent-retrieve-headers articles group fetch-old))
      (t
@@ -420,9 +425,7 @@ If BUFFER, insert the article in that group."
       (setq res (cons group article)
            clean-up t))
      ;; Check the agent cache.
-     ((and gnus-agent gnus-agent-cache gnus-plugged
-          (numberp article)
-          (gnus-agent-request-article article group))
+     ((gnus-agent-request-article article group)
       (setq res (cons group article)
            clean-up t))
      ;; Use `head' function.
@@ -455,9 +458,7 @@ If BUFFER, insert the article in that group."
       (setq res (cons group article)
            clean-up t))
      ;; Check the agent cache.
-     ((and gnus-agent gnus-agent-cache gnus-plugged
-          (numberp article)
-          (gnus-agent-request-article article group))
+     ((gnus-agent-request-article article group)
       (setq res (cons group article)
            clean-up t))
      ;; Use `head' function.
@@ -527,7 +528,7 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
           (gnus-get-function gnus-command-method 'request-expire-articles)
           articles (gnus-group-real-name group) (nth 1 gnus-command-method)
           force)))
-    (when (and gnus-agent gnus-agent-cache
+    (when (and gnus-agent
               (gnus-agent-method-p gnus-command-method))
       (let ((expired-articles (gnus-sorted-difference articles not-deleted)))
         (when expired-articles
@@ -541,7 +542,7 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
                                             'request-move-article)
                          article (gnus-group-real-name group)
                          (nth 1 gnus-command-method) accept-function last)))
-    (when (and result gnus-agent gnus-agent-cache
+    (when (and result gnus-agent
               (gnus-agent-method-p gnus-command-method))
       (gnus-agent-expire (list article) group 'force))
     result))