From: Chris Hanson Date: Wed, 19 Jan 2000 20:14:39 +0000 (+0000) Subject: Add FOLDER-FLAGS. X-Git-Tag: 20090517-FFI~4310 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=cdf0d0d2d33928784ed6306a2444d9fee4e86623;p=mit-scheme.git Add FOLDER-FLAGS. --- diff --git a/v7/src/imail/imail-core.scm b/v7/src/imail/imail-core.scm index eef55e016..3d1bfb43e 100644 --- a/v7/src/imail/imail-core.scm +++ b/v7/src/imail/imail-core.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-core.scm,v 1.13 2000/01/19 05:54:39 cph Exp $ +;;; $Id: imail-core.scm,v 1.14 2000/01/19 20:14:39 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -462,6 +462,15 @@ (define (clear-message-flag message flag) (set-message-flags! message (delete flag (message-flags message)))) +(define (folder-flags folder) + (let ((n (count-messages folder))) + (let loop ((index 0) (flags '())) + (if (< index n) + (loop (+ index 1) + (union-of-lists (message-flags (get-message folder index)) + flags)) + flags)))) + (define (message-flag? object) (or (memq object standard-message-flags) (header-field-name? object)))