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."
(let ((all-files (if file-name (list file-name)
rmail-inbox-list)))
(unwind-protect
(let (found)
(while all-files
(let ((opoint (point))
(new-messages 0)
......@@ -998,8 +999,7 @@ It returns t if it got any new messages."
(if (= new-messages 0)
(progn (goto-char opoint)
(if (or file-name rmail-inbox-list)
(message "(No new mail has arrived)"))
nil)
(message "(No new mail has arrived)")))
(if (rmail-summary-exists)
(rmail-select-summary
(rmail-update-summary)))
......@@ -1009,7 +1009,8 @@ It returns t if it got any new messages."
;; unless we have other unseen messages before it.
(rmail-show-message (rmail-first-unseen-message))
(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.
(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