From 7db4ddb387f910d4251b3fee1ed96bd344271d6f Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 15 May 1991 18:46:03 +0000 Subject: [PATCH] Change filename prompting to convert completion result to use "~" notation where appropriate. --- v7/src/edwin/filcom.scm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/v7/src/edwin/filcom.scm b/v7/src/edwin/filcom.scm index c8e2beb9c..e0ff9a8f3 100644 --- a/v7/src/edwin/filcom.scm +++ b/v7/src/edwin/filcom.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/filcom.scm,v 1.155 1991/05/15 17:42:25 cph Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/filcom.scm,v 1.156 1991/05/15 18:46:03 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-91 Massachusetts Institute of Technology ;;; @@ -266,7 +266,7 @@ invocation." (add-buffer-initialization! buffer database) (message "Ill-formed find-file initialization file: " - (os/pathname->display-string (->pathname filename)))))))) + (os/filename->display-string filename))))))) (define (standard-scheme-find-file-initialization database) ;; DATABASE -must- be a vector whose elements are all three element @@ -576,8 +576,14 @@ If a file with the new name already exists, confirmation is requested first." (os/pathname->display-string directory) 'INSERTED-DEFAULT (lambda (string if-unique if-not-unique if-not-found) - (filename-complete-string (prompt-string->pathname string directory) - if-unique if-not-unique if-not-found)) + (filename-complete-string + (prompt-string->pathname string directory) + (lambda (filename) + (if-unique (os/filename->display-string filename))) + (lambda (prefix get-completions) + (if-not-unique (os/filename->display-string prefix) + get-completions)) + if-not-found)) (lambda (string) (filename-completions-list (prompt-string->pathname string directory))) -- 2.25.1