From 32f6a3541905115ccac9dc464dbf7411ea6a53ba Mon Sep 17 00:00:00 2001 From: Henrik Enberg Date: Wed, 18 Jan 2006 11:47:37 +0000 Subject: [PATCH] (rmail-summary-get-new-mail): Only call `rmail-summary-goto-msg' if no new mail was found. --- lisp/mail/ChangeLog | 7 ++++++- lisp/mail/rmailsum.el | 11 +++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lisp/mail/ChangeLog b/lisp/mail/ChangeLog index 87914199293..7d8e4b4cac5 100644 --- a/lisp/mail/ChangeLog +++ b/lisp/mail/ChangeLog @@ -1,8 +1,13 @@ 2006-01-18 Henrik Enberg + * rmailsum.el (rmail-summary-get-new-mail): Only call + `rmail-summary-goto-msg' if no new mail was found. + * rmail.el (rmail-get-new-mail): Only call `rmail-show-message' on file-error condition if no new messages are found. - + (rmail): Only call `rmail-show-message' if no new mail + was found. + 2006-01-18 Alex Schroeder * rmail.el (rmail): Only insert the file if it actually exists. diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index d95a4201b7f..3bc50c2fd11 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -1271,11 +1271,14 @@ argument says to read a file name and use that file as the inbox." (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." -- 2.39.5