From: Chris Hanson Date: Tue, 29 May 2001 20:36:53 +0000 (+0000) Subject: Rename URL-IS-CONTAINER? to URL-CORRESPONDING-CONTAINER. Eliminate X-Git-Tag: 20090517-FFI~2765 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c87a6cf832b540af1d52a5f26b8545aca0201c09;p=mit-scheme.git Rename URL-IS-CONTAINER? to URL-CORRESPONDING-CONTAINER. Eliminate requirement that the result be #F if the resource doesn't exist. --- diff --git a/v7/src/imail/imail-browser.scm b/v7/src/imail/imail-browser.scm index 6db01e8e1..a9f4c8c8b 100644 --- a/v7/src/imail/imail-browser.scm +++ b/v7/src/imail/imail-browser.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-browser.scm,v 1.2 2001/05/26 03:02:29 cph Exp $ +;;; $Id: imail-browser.scm,v 1.3 2001/05/29 20:36:53 cph Exp $ ;;; ;;; Copyright (c) 2001 Massachusetts Institute of Technology ;;; @@ -137,7 +137,7 @@ To do: (+ 1 (loop container*))))))) (define (make-browser-line-info url) - (vector url (url-is-container? url) #f)) + (vector url (url-corresponding-container url) #f)) (define (browser-line-info-url info) (vector-ref info 0)) @@ -317,8 +317,8 @@ Each line summarizes a single mail folder. "" () (lambda () - (let ((url (selected-url))) - (let ((container (url-is-container? url))) + (let ((info (browser-line-info))) + (let ((container (browser-line-info-container-url info))) (if container ((ref-command imail-browse-container) (url->string container)) (editor-error "Not a selectable container.")))))) diff --git a/v7/src/imail/imail-core.scm b/v7/src/imail/imail-core.scm index 0196e0c37..9e254e51a 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.139 2001/05/26 02:12:50 cph Exp $ +;;; $Id: imail-core.scm,v 1.140 2001/05/29 20:36:34 cph Exp $ ;;; ;;; Copyright (c) 1999-2001 Massachusetts Institute of Technology ;;; @@ -135,10 +135,11 @@ ;; Return #T iff FOLDER-URL both exists and can be opened. (define-generic folder-url-is-selectable? (folder-url)) -;; If URL both exists and can contain other resources, return a -;; container URL for the same resource. Otherwise return #F. -(define-generic url-is-container? (url)) -(define-method url-is-container? ((url )) url) +;; If URL can potentially contain other resources, return a container +;; URL for the same resource. Otherwise return #F. The result is +;; undefined if the URL doesn't represent an existing folder. +(define-generic url-corresponding-container (url)) +(define-method url-corresponding-container ((url )) url) ;; Return a locator for the container of URL. E.g. the container URL ;; of "imap://localhost/inbox/foo" is "imap://localhost/inbox/". diff --git a/v7/src/imail/imail-file.scm b/v7/src/imail/imail-file.scm index aef38b77f..633fc3993 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.74 2001/05/25 18:16:51 cph Exp $ +;;; $Id: imail-file.scm,v 1.75 2001/05/29 20:36:40 cph Exp $ ;;; ;;; Copyright (c) 1999-2001 Massachusetts Institute of Technology ;;; @@ -179,7 +179,7 @@ (define-method folder-url-is-selectable? ((url )) (and (find-pathname-url-constructor (pathname-url-pathname url) #t #f) #t)) -(define-method url-is-container? ((url )) +(define-method url-corresponding-container ((url )) url #f) diff --git a/v7/src/imail/imail-imap.scm b/v7/src/imail/imail-imap.scm index 1ccd55862..e239b1ba6 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.169 2001/05/29 20:26:32 cph Exp $ +;;; $Id: imail-imap.scm,v 1.170 2001/05/29 20:36:47 cph Exp $ ;;; ;;; Copyright (c) 1999-2001 Massachusetts Institute of Technology ;;; @@ -146,7 +146,7 @@ (guarantee-imap-url-list-info url) (imap-folder-url-selectable? url)) -(define-method url-is-container? ((url )) +(define-method url-corresponding-container ((url )) (guarantee-imap-url-list-info url) (imap-folder-url-corresponding-container url))