summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2010-09-05 23:38:33 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2010-09-05 23:38:33 +0000
commit8695c9a712dcc123d7a775a64bc4201269e86dfc (patch)
treebd6eebfa2dff41dfc68625c6adca183d9c7280d8 /lisp
parent3ff31c90aba813d55ebff119ba678fcaf9d9619b (diff)
downloademacs-8695c9a712dcc123d7a775a64bc4201269e86dfc.tar.gz
mail-source.el (mail-source-fetch): Don't message if we're fetching mail from a file, and the file doesn't exist.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/ChangeLog3
-rw-r--r--lisp/gnus/mail-source.el15
2 files changed, 13 insertions, 5 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index bc814ee3a92..24a5c8dee4e 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,5 +1,8 @@
2010-09-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * mail-source.el (mail-source-fetch): Don't message if we're fetching
+ mail from a file, and the file doesn't exist.
+
* pop3.el (pop3-streaming-movemail): Return t for success.
* nnimap.el (nnimap-open-connection): Look for the "imaps" entry in the
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index 7a626869347..d3ceb6dfd07 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -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