]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-summary-get-new-mail): Only call
authorHenrik Enberg <henrik.enberg@telia.com>
Wed, 18 Jan 2006 11:47:37 +0000 (11:47 +0000)
committerHenrik Enberg <henrik.enberg@telia.com>
Wed, 18 Jan 2006 11:47:37 +0000 (11:47 +0000)
`rmail-summary-goto-msg' if no new mail was found.

lisp/mail/ChangeLog
lisp/mail/rmailsum.el

index 879141992938cb45cdd8a2e9afd4c02fddb1c9cc..7d8e4b4cac5581fe2e02d72419f04485edc46307 100644 (file)
@@ -1,8 +1,13 @@
 2006-01-18  Henrik Enberg  <enberg@printf.se>
 
+       * 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  <alex@gnu.org>
 
        * rmail.el (rmail): Only insert the file if it actually exists.
index d95a4201b7ffef89dfa1c283b953d2d22996adfc..3bc50c2fd11dfc8258b669acc1b57be7784e3f47 100644 (file)
@@ -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."