From f79f952515e4df901c884bbe9b4559be1053d898 Mon Sep 17 00:00:00 2001
From: Henrik Enberg <henrik.enberg@telia.com>
Date: Wed, 18 Jan 2006 19:27:36 +0000
Subject: [PATCH] (rmail): Fix last fix.

---
 lisp/mail/rmail.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 0f1b7d972b0..60b40c14205 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -843,7 +843,8 @@ If `rmail-display-summary' is non-nil, make a summary for this RMAIL file."
     ;; If new mail was found, display of the correct message was done
     ;; elsewhere.
     (unless new-mail
-      (rmail-show-message (rmail-first-unseen-message)))
+      (rmail-show-message (or (rmail-first-unseen-message)
+			      rmail-total-messages)))
     (rmail-construct-io-menu)
     ;; Run any callbacks if the buffer was not in rmail-mode
     (if run-mail-hook
-- 
2.39.5