From: Chris Hanson Date: Sat, 13 Apr 1991 03:58:36 +0000 (+0000) Subject: Change interface of `os/auto-save-pathname' so that it will generate a X-Git-Tag: 20090517-FFI~10750 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=9a14846feca30e3c67288f652767bb2c95957d10;p=mit-scheme.git Change interface of `os/auto-save-pathname' so that it will generate a correct result for buffers that have no visited pathname. --- diff --git a/v7/src/edwin/autosv.scm b/v7/src/edwin/autosv.scm index ff2e9b412..b72a87950 100644 --- a/v7/src/edwin/autosv.scm +++ b/v7/src/edwin/autosv.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/autosv.scm,v 1.23 1991/04/12 23:13:55 cph Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/autosv.scm,v 1.24 1991/04/13 03:58:23 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-91 Massachusetts Institute of Technology ;;; @@ -106,7 +106,7 @@ This file is not the file you visited; that changes only when you save." (let ((pathname (buffer-pathname buffer))) (if (and pathname (ref-variable auto-save-visited-file-name)) pathname - (os/auto-save-pathname pathname (buffer-name buffer)))))) + (os/auto-save-pathname pathname buffer))))) (define (disable-buffer-auto-save! buffer) (set-buffer-auto-save-pathname! buffer false)) diff --git a/v7/src/edwin/unix.scm b/v7/src/edwin/unix.scm index 21fb8c06f..11e397d30 100644 --- a/v7/src/edwin/unix.scm +++ b/v7/src/edwin/unix.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/unix.scm,v 1.13 1991/04/12 23:21:24 cph Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/unix.scm,v 1.14 1991/04/13 03:58:36 cph Exp $ ;;; ;;; Copyright (c) 1989-91 Massachusetts Institute of Technology ;;; @@ -62,14 +62,14 @@ (else (loop (-1+ slash)))))))) -(define (os/auto-save-pathname pathname buffer-name) +(define (os/auto-save-pathname pathname buffer) (let ((wrap (lambda (name directory) (merge-pathnames (string->pathname (string-append "#" name "#")) directory)))) (if (not pathname) - (wrap (string-append "%" buffer-name) - (working-directory-pathname)) + (wrap (string-append "%" (buffer-name buffer)) + (buffer-default-directory buffer)) (wrap (pathname-name-string pathname) (pathname-directory-path pathname)))))