changeset 88201:f6f1785286db

(rmail-summary-get-new-mail): Only call `rmail-summary-goto-msg' if no new mail was found.
author Henrik Enberg <henrik.enberg@telia.com>
date Wed, 18 Jan 2006 11:47:19 +0000
parents 845dd39e284d
children 4ece5630c0fb
files lisp/mail/rmailsum.el
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailsum.el	Wed Jan 18 11:46:50 2006 +0000
+++ b/lisp/mail/rmailsum.el	Wed Jan 18 11:47:19 2006 +0000
@@ -1271,11 +1271,14 @@
   (interactive
    (list (if current-prefix-arg
 	     (read-file-name "Get new mail from file: "))))
-  (let (current-message)
+  (let (current-message new-mail)
     (with-current-buffer rmail-buffer
-      (rmail-get-new-mail file-name)
-      (setq current-message rmail-current-message))
-    (rmail-summary-goto-msg current-message nil t)))
+      (setq new-mail (rmail-get-new-mail file-name)
+	    current-message rmail-current-message))
+    ;; If new mail was found, display of the correct message was
+    ;; done elsewhere.
+    (unless new-mail
+      (rmail-summary-goto-msg current-message nil t))))
 
 (defun rmail-summary-input (filename)
   "Run Rmail on file FILENAME."