From 3133266381a175a5e7f0fd700313817a9346b7b2 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 15 May 2000 19:20:58 +0000 Subject: [PATCH] Rename NEW-FOLDER to CREATE-FOLDER, and change definition so that the new folder object is _not_ returned. This is more in line with capabilities of IMAP. --- v7/src/imail/imail-core.scm | 11 ++++------- v7/src/imail/imail-imap.scm | 4 ++-- v7/src/imail/imail-rmail.scm | 9 ++++----- v7/src/imail/imail-umail.scm | 9 ++++----- 4 files changed, 14 insertions(+), 19 deletions(-) diff --git a/v7/src/imail/imail-core.scm b/v7/src/imail/imail-core.scm index 59cf35763..dffe99b18 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.58 2000/05/15 19:17:09 cph Exp $ +;;; $Id: imail-core.scm,v 1.59 2000/05/15 19:20:40 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -96,13 +96,10 @@ ;; Create a new folder named URL. Signal an error if the folder ;; already exists or can't be created. -(define (new-folder url) - (let ((url (->url url))) - (if (get-memoized-folder url) - (error "Folder already exists:" url) - (memoize-folder (%new-folder url))))) +(define (create-folder url) + (%create-folder (->url url))) -(define-generic %new-folder (url)) +(define-generic %create-folder (url)) ;; ------------------------------------------------------------------- ;; Delete the folder named URL. Signal an error if the folder doesn't diff --git a/v7/src/imail/imail-imap.scm b/v7/src/imail/imail-imap.scm index 9ce3a5dab..b257ce3a8 100644 --- a/v7/src/imail/imail-imap.scm +++ b/v7/src/imail/imail-imap.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-imap.scm,v 1.36 2000/05/15 19:17:14 cph Exp $ +;;; $Id: imail-imap.scm,v 1.37 2000/05/15 19:20:50 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -507,7 +507,7 @@ ;;;; Server operations -(define-method %new-folder ((url )) +(define-method %create-folder ((url )) ???) (define-method %delete-folder ((url )) diff --git a/v7/src/imail/imail-rmail.scm b/v7/src/imail/imail-rmail.scm index a958191db..d23be1f23 100644 --- a/v7/src/imail/imail-rmail.scm +++ b/v7/src/imail/imail-rmail.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-rmail.scm,v 1.26 2000/05/15 19:01:54 cph Exp $ +;;; $Id: imail-rmail.scm,v 1.27 2000/05/15 19:20:55 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -45,16 +45,15 @@ (error:bad-range-argument url 'OPEN-FOLDER)) (make-rmail-folder url)) -(define-method %new-folder ((url )) +(define-method %create-folder ((url )) (if (file-exists? (file-url-pathname url)) - (error:bad-range-argument url 'NEW-FOLDER)) + (error:bad-range-argument url 'CREATE-FOLDER)) (let ((folder (make-rmail-folder url))) (set-file-folder-messages! folder '()) (set-rmail-folder-header-fields! folder (compute-rmail-folder-header-fields folder)) - (save-folder folder) - folder)) + (save-folder folder))) ;;;; Folder diff --git a/v7/src/imail/imail-umail.scm b/v7/src/imail/imail-umail.scm index 758373138..c14ed4c25 100644 --- a/v7/src/imail/imail-umail.scm +++ b/v7/src/imail/imail-umail.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-umail.scm,v 1.22 2000/05/15 19:01:57 cph Exp $ +;;; $Id: imail-umail.scm,v 1.23 2000/05/15 19:20:58 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -45,13 +45,12 @@ (error:bad-range-argument url 'OPEN-FOLDER)) (make-umail-folder url)) -(define-method %new-folder ((url )) +(define-method %create-folder ((url )) (if (file-exists? (file-url-pathname url)) - (error:bad-range-argument url 'NEW-FOLDER)) + (error:bad-range-argument url 'CREATE-FOLDER)) (let ((folder (make-umail-folder url))) (set-file-folder-messages! folder '()) - (save-folder folder) - folder)) + (save-folder folder))) (define (read-umail-file pathname) (make-umail-folder (make-umail-url pathname))) -- 2.25.1