Update copyright for several files.
[gnus] / lisp / gnus-int.el
index 3135940..8c0146c 100644 (file)
@@ -49,7 +49,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.")
@@ -202,12 +202,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
@@ -347,7 +352,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
@@ -419,9 +424,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.
@@ -454,9 +457,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.
@@ -526,20 +527,21 @@ 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
           (gnus-agent-expire expired-articles group 'force))))
     not-deleted))
 
-(defun gnus-request-move-article (article group server accept-function &optional last)
+(defun gnus-request-move-article (article group server accept-function
+                                         &optional last)
   (let* ((gnus-command-method (gnus-find-method-for-group group))
         (result (funcall (gnus-get-function gnus-command-method
                                             '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))