Bind RET and TAB on images for better UX.
[gnus] / lisp / mail-source.el
index a8db55b..d3ceb6d 100644 (file)
@@ -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
@@ -631,23 +636,23 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile)
     ;; Delete or move the incoming mail out of the way.
     (if (eq mail-source-delete-incoming t)
        (delete-file mail-source-crash-box)
-      ;; Don't check for old incoming files more than once per day to
-      ;; save a lot of file accesses.
-      (when (or (null mail-source-incoming-last-checked-time)
-               (> (time-to-seconds
-                   (time-since mail-source-incoming-last-checked-time))
-                  (* 24 60 60)))
-       (setq mail-source-incoming-last-checked-time (current-time))
-       (let ((incoming
-              (mm-make-temp-file
-               (expand-file-name
-                mail-source-incoming-file-prefix
-                mail-source-directory))))
-         (unless (file-exists-p (file-name-directory incoming))
-           (make-directory (file-name-directory incoming) t))
-         (rename-file mail-source-crash-box incoming t)
-         ;; remove old incoming files?
-         (when (natnump mail-source-delete-incoming)
+      (let ((incoming
+            (mm-make-temp-file
+             (expand-file-name
+              mail-source-incoming-file-prefix
+              mail-source-directory))))
+       (unless (file-exists-p (file-name-directory incoming))
+         (make-directory (file-name-directory incoming) t))
+       (rename-file mail-source-crash-box incoming t)
+       ;; remove old incoming files?
+       (when (natnump mail-source-delete-incoming)
+         ;; Don't check for old incoming files more than once per day to
+         ;; save a lot of file accesses.
+         (when (or (null mail-source-incoming-last-checked-time)
+                   (> (time-to-seconds
+                       (time-since mail-source-incoming-last-checked-time))
+                      (* 24 60 60)))
+           (setq mail-source-incoming-last-checked-time (current-time))
            (mail-source-delete-old-incoming
             mail-source-delete-incoming
             mail-source-delete-old-incoming-confirm)))))))