From: Chris Hanson Date: Wed, 18 Nov 1998 03:42:26 +0000 (+0000) Subject: Eliminate another file error in prompting. X-Git-Tag: 20090517-FFI~4715 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a96ac2a086358ea0d44b9f11ead3dd3d4fe574d8;p=mit-scheme.git Eliminate another file error in prompting. --- diff --git a/v7/src/edwin/filcom.scm b/v7/src/edwin/filcom.scm index a3f356299..72c5d6894 100644 --- a/v7/src/edwin/filcom.scm +++ b/v7/src/edwin/filcom.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: filcom.scm,v 1.195 1998/11/18 03:17:52 cph Exp $ +;;; $Id: filcom.scm,v 1.196 1998/11/18 03:42:26 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-98 Massachusetts Institute of Technology ;;; @@ -186,9 +186,9 @@ invocation." (event-distributor/invoke! (ref-variable find-file-hooks buffer) buffer) (load-find-file-initialization buffer pathname))) -(define (file-test-no-errors test pathname) +(define (file-test-no-errors test . args) (catch-file-errors (lambda () false) - (lambda () (test pathname)))) + (lambda () (apply test args)))) (define (file-newer-than-file? a b) (let ((a (file-modification-time-indirect a))) diff --git a/v7/src/edwin/unix.scm b/v7/src/edwin/unix.scm index 550d45a08..341c926f4 100644 --- a/v7/src/edwin/unix.scm +++ b/v7/src/edwin/unix.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: unix.scm,v 1.85 1998/10/23 05:42:24 cph Exp $ +;;; $Id: unix.scm,v 1.86 1998/11/18 03:40:46 cph Exp $ ;;; ;;; Copyright (c) 1989-98 Massachusetts Institute of Technology ;;; @@ -105,7 +105,7 @@ Includes the new backup. Must be > 0." ;; comparison, and will not notice aliases. (let ((homedir (user-homedir-pathname))) (let loop ((directory (directory-pathname pathname))) - (cond ((file-eq? directory homedir) + (cond ((file-test-no-errors file-eq? directory homedir) (string-append "~/" (->namestring (enough-pathname pathname directory))))