Mercurial > emacs
diff lisp/mail/rmail.el @ 102097:a07976575a49
(rmail-get-new-mail-filter-spam): Show a message rather than the raw
mbox while prompting.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Wed, 18 Feb 2009 08:02:56 +0000 |
parents | 7697cceb3a2b |
children | 206623e4bc00 |
line wrap: on
line diff
--- a/lisp/mail/rmail.el Wed Feb 18 08:01:56 2009 +0000 +++ b/lisp/mail/rmail.el Wed Feb 18 08:02:56 2009 +0000 @@ -1710,8 +1710,8 @@ (message "%d new message%s read%s" new-messages suffix blurb) (unless (string-equal blurb "") ; there was spam (if rsf-beep (beep t)) - ;; FIXME This doesn't seem a very good feature, e.g. it delays the - ;; appearance of the summary, and leaves the raw buffer visible. + ;; The use of rmail-show-message in rmail-get-new-mail-filter-spam + ;; also prevents the raw mbox buffer from showing at this point. (sleep-for rsf-sleep-after-message)) ;; Establish the return value. (setq result (> new-messages 0)) @@ -1726,12 +1726,13 @@ (or (rmail-spam-filter nscan) (setq nspam (1+ nspam))) (setq nscan (1+ nscan))) - ;; FIXME the expunge prompt leaves the raw mbox buffer showing, - ;; but it's not straightforward to show a message at this point - ;; without messing up the rest of get-new-mail. - (and (> nspam 0) - (rmail-expunge-confirmed) - (rmail-only-expunge t)) + (when (> nspam 0) + ;; Otherwise the expunge prompt leaves the raw mbox buffer showing. + (rmail-show-message (rmail-first-unseen-message) 1) + (if (rmail-expunge-confirmed) (rmail-only-expunge t)) + ;; Swap back, else get-new-mail-1 gets confused. + (rmail-swap-buffers-maybe) + (widen)) ;; Return a message based on the number of spam messages found. (cond ((zerop nspam) "")