aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman1994-12-03 18:29:24 +0000
committerRichard M. Stallman1994-12-03 18:29:24 +0000
commitbcddd52e8c01622559ba8fdddc8504f78a8a02d6 (patch)
treebfe7206cb712c20e08d3737affe1848932487186 /lisp
parentc03e1113ab9f95c5aca4f573e79e8c80ba63a0f0 (diff)
downloademacs-bcddd52e8c01622559ba8fdddc8504f78a8a02d6.tar.gz
emacs-bcddd52e8c01622559ba8fdddc8504f78a8a02d6.zip
(rmail-get-new-mail): Position on first unseen message.
Return t if actually got new mail. (rmail): Show rmail-first-unseen-message if got no new mail.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mail/rmail.el23
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 6a3a1886e59..3f251e6892c 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -281,14 +281,9 @@ If `rmail-display-summary' is non-nil, make a summary for this RMAIL file."
281 (progn 281 (progn
282 (rmail-set-message-counters) 282 (rmail-set-message-counters)
283 (rmail-show-message)))) 283 (rmail-show-message))))
284 (let ((existing-unseen (rmail-first-unseen-message))) 284 (or (and (null file-name-arg)
285 (or file-name-arg 285 (rmail-get-new-mail))
286 (rmail-get-new-mail)) 286 (rmail-show-message (rmail-first-unseen-message)))
287 ;; Show the first unseen message, which might be from a previous session
288 ;; or might have been just read in by rmail-get-new-mail. Must
289 ;; determine already unseen messages first, as rmail-get-new-mail
290 ;; positions on the first new message, thus marking it as seen.
291 (rmail-show-message existing-unseen))
292 (if rmail-display-summary (rmail-summary)) 287 (if rmail-display-summary (rmail-summary))
293 (rmail-construct-io-menu))) 288 (rmail-construct-io-menu)))
294 289
@@ -800,7 +795,8 @@ file of new mail is not changed or deleted. Noninteractively, you can
800pass the inbox file name as an argument. Interactively, a prefix 795pass the inbox file name as an argument. Interactively, a prefix
801argument causes us to read a file name and use that file as the inbox. 796argument causes us to read a file name and use that file as the inbox.
802 797
803This function runs `rmail-get-new-mail-hook' before saving the updated file." 798This function runs `rmail-get-new-mail-hook' before saving the updated file.
799It returns t if it got any new messages."
804 (interactive 800 (interactive
805 (list (if current-prefix-arg 801 (list (if current-prefix-arg
806 (read-file-name "Get new mail from file: ")))) 802 (read-file-name "Get new mail from file: "))))
@@ -864,16 +860,21 @@ This function runs `rmail-get-new-mail-hook' before saving the updated file."
864 (if (= new-messages 0) 860 (if (= new-messages 0)
865 (progn (goto-char opoint) 861 (progn (goto-char opoint)
866 (if (or file-name rmail-inbox-list) 862 (if (or file-name rmail-inbox-list)
867 (message "(No new mail has arrived)"))) 863 (message "(No new mail has arrived)"))
864 nil)
868 (if (rmail-summary-exists) 865 (if (rmail-summary-exists)
869 (rmail-select-summary 866 (rmail-select-summary
870 (rmail-update-summary))) 867 (rmail-update-summary)))
871 (message "%d new message%s read" 868 (message "%d new message%s read"
872 new-messages (if (= 1 new-messages) "" "s")) 869 new-messages (if (= 1 new-messages) "" "s"))
870 ;; Move to the first new message
871 ;; unless we have other unseen messages before it.
872 (rmail-show-message (rmail-first-unseen-message))
873 ;; Update the displayed time, since that will clear out 873 ;; Update the displayed time, since that will clear out
874 ;; the flag that says you have mail. 874 ;; the flag that says you have mail.
875 (if (eq (process-status "display-time") 'run) 875 (if (eq (process-status "display-time") 'run)
876 (display-time-filter display-time-process "")))) 876 (display-time-filter display-time-process ""))
877 t))
877 ;; Don't leave the buffer screwed up if we get a disk-full error. 878 ;; Don't leave the buffer screwed up if we get a disk-full error.
878 (rmail-show-message))) 879 (rmail-show-message)))
879 880