From: Chris Hanson Date: Mon, 7 Feb 2000 22:37:21 +0000 (+0000) Subject: Add bit to say whether folder or message has been modified. X-Git-Tag: 20090517-FFI~4258 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c836cf871ac8eca1aa7945d09330bb28910a4e48;p=mit-scheme.git Add bit to say whether folder or message has been modified. --- diff --git a/v7/src/imail/imail-core.scm b/v7/src/imail/imail-core.scm index 0ad0a381d..d1c3d115d 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.22 2000/02/07 22:31:44 cph Exp $ +;;; $Id: imail-core.scm,v 1.23 2000/02/07 22:37:19 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -270,8 +270,7 @@ (if (not (<= index (folder-length folder))) (error:bad-range-argument index 'INSERT-MESSAGE)) (guarantee-message message 'INSERT-MESSAGE) - (%insert-message folder index message) - (folder-modified! folder)) + (%insert-message folder index message)) (define-generic %insert-message (folder index message)) @@ -279,8 +278,7 @@ ;;; messages. Unspecified result. (define (append-message folder message) (guarantee-message message 'APPEND-MESSAGE) - (%append-message folder message) - (folder-modified! folder)) + (%append-message folder message)) (define-generic %append-message (folder message)) @@ -379,7 +377,7 @@ (cons (car headers) headers*) flags properties))))) - + (define (attach-message message folder) (guarantee-folder folder 'ATTACH-MESSAGE) (let ((message @@ -389,8 +387,6 @@ (alist-copy (message-properties message)) folder))) (set-message-folder! message folder) - (if (message-modified? message) - (folder-modified! folder)) message)) (define (detach-message message) diff --git a/v7/src/imail/imail-file.scm b/v7/src/imail/imail-file.scm index c9ec910c7..c3ba40403 100644 --- a/v7/src/imail/imail-file.scm +++ b/v7/src/imail/imail-file.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-file.scm,v 1.8 2000/02/07 22:31:49 cph Exp $ +;;; $Id: imail-file.scm,v 1.9 2000/02/07 22:37:21 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -95,7 +95,8 @@ (do ((messages messages (cdr messages)) (index 1 (fix:+ index 1))) ((not (pair? messages))) - (set-message-index! (car messages) index)) + (set-message-index! (car messages) index) + (message-modified! (car messages))) (set-file-folder-messages! folder (cons message messages))) (let loop ((index* 1) (prev messages) (this (cdr messages))) (if (not (pair? this)) @@ -105,10 +106,12 @@ (do ((messages this (cdr messages)) (index (fix:+ index 1) (fix:+ index 1))) ((not (pair? messages))) - (set-message-index! (car messages) index)) + (set-message-index! (car messages) index) + (message-modified! (car messages))) (set-cdr! prev (cons message this))) - (loop (fix:+ index* 1) this (cdr this)))))))))) - + (loop (fix:+ index* 1) this (cdr this)))))) + (message-modified! message))))) + (define-method %append-message ((folder ) message) (let ((message (attach-message message folder))) (without-interrupts @@ -127,7 +130,8 @@ messages) (begin (set-message-index! message 0) - (list message))))))))) + (list message))))) + (message-modified! message))))) (define-method expunge-deleted-messages ((folder )) (without-interrupts