From: Chris Hanson Date: Tue, 18 Apr 2000 21:20:01 +0000 (+0000) Subject: Eliminate INSERT-MESSAGE, which isn't supported by IMAP and isn't X-Git-Tag: 20090517-FFI~4009 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a27b2cfdc67399bcbf164a5a0b849cc6d849443b;p=mit-scheme.git Eliminate INSERT-MESSAGE, which isn't supported by IMAP and isn't needed. --- diff --git a/v7/src/imail/imail-core.scm b/v7/src/imail/imail-core.scm index a6791c112..cfbdeecca 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.28 2000/04/14 01:45:34 cph Exp $ +;;; $Id: imail-core.scm,v 1.29 2000/04/18 21:20:00 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -278,18 +278,6 @@ (define-generic %get-message (folder index)) -;; Insert a copy of MESSAGE in FOLDER at INDEX; pre-existing messages -;; with indices of INDEX or higher have their indices incremented. -;; Unspecified result. -(define (insert-message folder index message) - (guarantee-index index 'INSERT-MESSAGE) - (if (not (<= index (folder-length folder))) - (error:bad-range-argument index 'INSERT-MESSAGE)) - (guarantee-message message 'INSERT-MESSAGE) - (%insert-message folder index message)) - -(define-generic %insert-message (folder index message)) - ;;; Insert a copy of MESSAGE in FOLDER at the end of the existing ;;; messages. Unspecified result. (define (append-message folder message) diff --git a/v7/src/imail/imail-file.scm b/v7/src/imail/imail-file.scm index c3ba40403..243101d29 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.9 2000/02/07 22:37:21 cph Exp $ +;;; $Id: imail-file.scm,v 1.10 2000/04/18 21:20:01 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -84,34 +84,6 @@ (define-method %get-message ((folder ) index) (list-ref (file-folder-messages folder) index)) -(define-method %insert-message ((folder ) index message) - (let ((message (attach-message message folder))) - (set-message-index! message index) - (without-interrupts - (lambda () - (let ((messages (file-folder-messages folder))) - (if (fix:= 0 index) - (begin - (do ((messages messages (cdr messages)) - (index 1 (fix:+ index 1))) - ((not (pair? messages))) - (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)) - (error:bad-range-argument index 'INSERT-MESSAGE)) - (if (fix:= index index*) - (begin - (do ((messages this (cdr messages)) - (index (fix:+ index 1) (fix:+ index 1))) - ((not (pair? messages))) - (set-message-index! (car messages) index) - (message-modified! (car messages))) - (set-cdr! prev (cons message 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