Make sure that the error message doesn't error out.
[gnus] / lisp / mail-source.el
index 7a62686..662b999 100644 (file)
@@ -34,7 +34,7 @@
   (require 'cl)
   (require 'imap))
 (autoload 'auth-source-user-or-password "auth-source")
-(autoload 'pop3-streaming-movemail "pop3")
+(autoload 'pop3-movemail "pop3")
 (autoload 'pop3-get-message-count "pop3")
 (autoload 'nnheader-cancel-timer "nnheader")
 (require 'mm-util)
@@ -544,11 +544,16 @@ Return the number of files that were found."
   (mail-source-bind-common source
     (if (or mail-source-plugged plugged)
        (save-excursion
-         (nnheader-message 4 "%sReading incoming mail from %s..."
-                           (if method
-                               (format "%s: " method)
-                             "")
-                           (car source))
+         ;; Special-case the `file' handler since it's so common and
+         ;; just adds noise.
+         (when (or (not (eq (car source) 'file))
+                   (mail-source-bind (file source)
+                     (file-exists-p path)))
+           (nnheader-message 4 "%sReading incoming mail from %s..."
+                             (if method
+                                 (format "%s: " method)
+                               "")
+                             (car source)))
          (let ((function (cadr (assq (car source) mail-source-fetcher-alist)))
                (found 0))
            (unless function
@@ -834,11 +839,9 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile)
                     (if (eq authentication 'apop) 'apop 'pass))
                    (pop3-stream-type stream))
                (if (or debug-on-quit debug-on-error)
-                   (save-excursion (pop3-streaming-movemail
-                                    mail-source-crash-box))
+                   (save-excursion (pop3-movemail mail-source-crash-box))
                  (condition-case err
-                     (save-excursion (pop3-streaming-movemail
-                                      mail-source-crash-box))
+                     (save-excursion (pop3-movemail mail-source-crash-box))
                    (error
                     ;; We nix out the password in case the error
                     ;; was because of a wrong password being given.