Commit 9a10bd0d authored by Karl Heuer's avatar Karl Heuer
Browse files

(rmail-get-new-mail): Fix return value to match doc.

parent fd2d7b3d
...@@ -916,6 +916,7 @@ It returns t if it got any new messages." ...@@ -916,6 +916,7 @@ It returns t if it got any new messages."
(let ((all-files (if file-name (list file-name) (let ((all-files (if file-name (list file-name)
rmail-inbox-list))) rmail-inbox-list)))
(unwind-protect (unwind-protect
(let (found)
(while all-files (while all-files
(let ((opoint (point)) (let ((opoint (point))
(new-messages 0) (new-messages 0)
...@@ -998,8 +999,7 @@ It returns t if it got any new messages." ...@@ -998,8 +999,7 @@ It returns t if it got any new messages."
(if (= new-messages 0) (if (= new-messages 0)
(progn (goto-char opoint) (progn (goto-char opoint)
(if (or file-name rmail-inbox-list) (if (or file-name rmail-inbox-list)
(message "(No new mail has arrived)")) (message "(No new mail has arrived)")))
nil)
(if (rmail-summary-exists) (if (rmail-summary-exists)
(rmail-select-summary (rmail-select-summary
(rmail-update-summary))) (rmail-update-summary)))
...@@ -1009,7 +1009,8 @@ It returns t if it got any new messages." ...@@ -1009,7 +1009,8 @@ It returns t if it got any new messages."
;; unless we have other unseen messages before it. ;; unless we have other unseen messages before it.
(rmail-show-message (rmail-first-unseen-message)) (rmail-show-message (rmail-first-unseen-message))
(run-hooks 'rmail-after-get-new-mail-hook) (run-hooks 'rmail-after-get-new-mail-hook)
t))) (setq found t))))
found)
;; Don't leave the buffer screwed up if we get a disk-full error. ;; Don't leave the buffer screwed up if we get a disk-full error.
(rmail-show-message)))) (rmail-show-message))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment