From 8d91a24b2a14ca0579f08ae5ad21ffa91a500be7 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 7 Apr 2000 19:12:24 +0000 Subject: [PATCH] Don't duplicate logic that is already available in "rmail.scm"; share it. --- v7/src/imail/imail-rmail.scm | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/v7/src/imail/imail-rmail.scm b/v7/src/imail/imail-rmail.scm index bc95106b4..3574dcfe8 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.15 2000/04/06 22:05:53 cph Exp $ +;;; $Id: imail-rmail.scm,v 1.16 2000/04/07 19:12:24 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -256,6 +256,7 @@ (if (null? pathnames) #f (let ((initial-count (folder-length folder))) + (guarantee-rmail-variables-initialized) (let ((inbox-folders (map (lambda (pathname) (let ((inbox (read-rmail-inbox folder pathname #t))) @@ -281,32 +282,16 @@ (lambda (filename) (merge-pathnames (string-trim filename) directory))) (burst-string inboxes #\, #f))) - ((pathname=? (rmail-primary-folder-name) + ((pathname=? (edwin-variable 'RMAIL-FILE-NAME) (url-body (folder-url folder))) - (rmail-primary-inbox-list)) + (edwin-variable-value 'RMAIL-PRIMARY-INBOX-LIST)) (else '())))) - -(define (rmail-primary-folder-name) - "RMAIL") - -(define (rmail-primary-inbox-list) - (let ((l (variable-value (name->variable 'RMAIL-PRIMARY-INBOX-LIST 'ERROR)))) - (if (null? l) - (os/rmail-primary-inbox-list - (let ((d (os/rmail-spool-directory))) - (if d - (list (string-append d (current-user-name))) - '()))) - l))) - -(define (rmail-spool-directory) - (os/rmail-spool-directory)) (define (read-rmail-inbox folder pathname rename?) (let ((pathname (cond ((not rename?) pathname) - ((pathname=? (rmail-spool-directory) + ((pathname=? rmail-spool-directory (directory-pathname pathname)) (rename-inbox-using-movemail pathname -- 2.25.1