(mail-source-fetch): Ignore errors.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Fri, 7 Feb 2003 14:38:03 +0000 (14:38 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Fri, 7 Feb 2003 14:38:03 +0000 (14:38 +0000)
(mail-source-ignore-errors): New variable.

lisp/ChangeLog
lisp/mail-source.el

index 00a7348..a1cf07b 100644 (file)
@@ -1,5 +1,8 @@
 2003-02-07  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * mail-source.el (mail-source-fetch): Ignore errors.
+       (mail-source-ignore-errors): New variable.
+
        * gnus-sum.el (gnus-summary-refer-thread): Don't re-fetch current
        articles. 
 
index e841449..acc9d4d 100644 (file)
@@ -231,6 +231,11 @@ See Info node `(gnus)Mail Source Specifiers'."
                                          (const :format "" :value :plugged)
                                          (boolean :tag "Plugged")))))))
 
+(defcustom mail-source-ignore-errors nil
+  "*Ignore errors when querying mail sources.
+If nil, the user will be prompted when an error occurs.  If non-nil,
+the error will be ignored.")
+
 (defcustom mail-source-primary-source nil
   "*Primary source for incoming mail.
 If non-nil, this maildrop will be checked periodically for new mail."
@@ -476,15 +481,16 @@ Return the number of files that were found."
                 (condition-case err
                     (funcall function source callback)
                   (error
-                   (unless (yes-or-no-p
-                            (format "Mail source %s error (%s).  Continue? "
-                                    (if (memq ':password source)
-                                        (let ((s (copy-sequence source)))
-                                          (setcar (cdr (memq ':password s)) 
-                                                  "********")
-                                          s)
-                                      source)
-                                    (cadr err)))
+                   (if (and (not mail-source-ignore-error)
+                            (yes-or-no-p
+                             (format "Mail source %s error (%s).  Continue? "
+                                     (if (memq ':password source)
+                                         (let ((s (copy-sequence source)))
+                                           (setcar (cdr (memq ':password s)) 
+                                                   "********")
+                                           s)
+                                       source)
+                                     (cadr err))))
                      (error "Cannot get new mail"))
                    0)))))))))