flag isn't set. It's common to delete messages without seeing them,
and the act of deletion is an indication that the user isn't
interested in seeing them.
However, don't mark these messages as seen; they might later be
undeleted, in which case they want to retain their unseen status.
;;; -*-Scheme-*-
;;;
-;;; $Id: imail-top.scm,v 1.214 2000/09/07 03:21:28 cph Exp $
+;;; $Id: imail-top.scm,v 1.215 2000/09/30 00:21:55 cph Exp $
;;;
;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
;;;
(let ((n (folder-length folder)))
(do ((i 0 (+ i 1))
(unseen 0
- (if (message-unseen? (get-message folder i))
- (+ unseen 1)
- unseen)))
+ (if (let ((m (get-message folder i)))
+ (or (message-seen? m)
+ (message-deleted? m)))
+ unseen
+ (+ unseen 1))))
((= i n) unseen))))
\f
;;;; Probe-folder thread