From: Taylor R. Campbell Date: Mon, 11 Aug 2008 22:27:26 +0000 (+0000) Subject: Use APPEND-MAP, not MAP, over the list of internal header fields in X-Git-Tag: 20090517-FFI~255 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=5337f5870f2a7d210ba8463c8df6f4eb376c9e3b;p=mit-scheme.git Use APPEND-MAP, not MAP, over the list of internal header fields in HEADER-FIELDS->MESSAGE-FLAGS: BURST-STRING returns a list of flags each time, the collection of which we want to concatenate before deleting duplicates. --- diff --git a/v7/src/imail/imail-core.scm b/v7/src/imail/imail-core.scm index bb679ad09..5365e30c3 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.171 2008/07/03 20:08:07 cph Exp $ +$Id: imail-core.scm,v 1.172 2008/08/11 22:27:26 riastradh Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -944,13 +944,14 @@ USA. (decorated-string-append "" " " "" flags))) (define (header-fields->message-flags headers) - (delete-duplicates! (map (lambda (header) - (burst-string (header-field-value header) - char-set:whitespace - #t)) - (filter (internal-header-field-predicate "FLAGS") - headers)) - string-ci=?)) + (delete-duplicates + (append-map (lambda (header) + (burst-string (header-field-value header) + char-set:whitespace + #t)) + (filter (internal-header-field-predicate "FLAGS") + headers)) + string-ci=?)) (define (message-deleted? msg) (message-flagged? msg "deleted")) (define (message-undeleted? msg) (not (message-flagged? msg "deleted")))