*** empty log message ***
[gnus] / lisp / mail-source.el
index bd27763..5a66e10 100644 (file)
   "The mail-fetching library."
   :group 'gnus)
 
+(defcustom mail-sources nil
+  "*Where the mail backends will look for incoming mail.
+This variable is a list of mail source specifiers."
+  :group 'mail-source
+  :type 'sexp)
+
 (defcustom mail-source-crash-box "~/.emacs-mail-crash-box"
   "File where mail will be stored while processing it."
   :group 'mail-source
@@ -169,8 +175,15 @@ Return the number of files that were found."
       (when (file-exists-p mail-source-crash-box)
        (message "Processing mail from %s..." mail-source-crash-box)
        (setq found (mail-source-callback
-                    callback mail-source-crash-box)))
-      (+ found (funcall function source callback)))))
+                     callback mail-source-crash-box)))
+      (+ found
+         (condition-case err
+             (funcall function source callback)
+           (error
+            (unless (yes-or-no-p
+                    (format "Mail source error.  Continue? "))
+              (error "Cannot get new mail."))
+            0))))))
 
 (defun mail-source-make-complex-temp-name (prefix)
   (let ((newname (make-temp-name prefix))
@@ -306,8 +319,8 @@ If ARGS, PROMPT is used as an argument to `format'."
                       (format-spec-make ?t mail-source-crash-box)))))
     (let ((mail-source-string (format "file:%s" path)))
       (if (mail-source-movemail path mail-source-crash-box)
-         (progn
-         (mail-source-callback callback path)
+         (prog1
+             (mail-source-callback callback path)
            (when prescript
              (if (and (symbolp prescript) (fboundp prescript))
                  (funcall prescript)