;;; -*-Scheme-*-
;;;
-;;; $Id: imail-core.scm,v 1.24 2000/02/07 23:23:45 cph Exp $
+;;; $Id: imail-core.scm,v 1.25 2000/04/06 04:22:21 cph Exp $
;;;
;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
;;;
(properties define standard
initializer make-1d-table))
+(define-method write-instance ((folder <file-folder>) port)
+ (write-instance-helper 'FOLDER folder port
+ (lambda ()
+ (write-char #\space port)
+ (write (url->string (folder-url folder)) port))))
+
(define (guarantee-folder folder procedure)
(if (not (folder? folder))
(error:wrong-type-argument folder "IMAIL folder" procedure)))
(%get-message folder index))
(define-generic %get-message (folder index))
-
+\f
;; Insert a copy of MESSAGE in FOLDER at INDEX; pre-existing messages
;; with indices of INDEX or higher have their indices incremented.
;; Unspecified result.
(%append-message folder message))
(define-generic %append-message (folder message))
-\f
+
;; Remove all messages in FOLDER that are marked for deletion.
;; Unspecified result.
(define-generic expunge-deleted-messages (folder))
(modified? define standard
initial-value #t)
(properties define standard)
- (folder define standard)
+ (folder define standard
+ initial-value #f)
(index define standard))
+(define-method write-instance ((message <message>) port)
+ (write-instance-helper 'MESSAGE message port
+ (lambda ()
+ (if (message-folder message)
+ (begin
+ (write-char #\space port)
+ (write (message-folder message) port))))))
+
(define (guarantee-message message procedure)
(if (not (message? message))
(error:wrong-type-argument message "IMAIL message" procedure)))
(make-message (map copy-header-field (header-fields message))
(message-body message)
(list-copy (message-flags message))
- (alist-copy (message-properties message))
- folder)))
+ (alist-copy (message-properties message)))))
(set-message-folder! message folder)
message))