Change interface of `os/auto-save-pathname' so that it will generate a
authorChris Hanson <org/chris-hanson/cph>
Sat, 13 Apr 1991 03:58:36 +0000 (03:58 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sat, 13 Apr 1991 03:58:36 +0000 (03:58 +0000)
correct result for buffers that have no visited pathname.

v7/src/edwin/autosv.scm
v7/src/edwin/unix.scm

index ff2e9b41257d36e6d0c4ccde0b24d975d0ed33d4..b72a87950a6e64cabab651c418226e06713b3a97 100644 (file)
@@ -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))
index 21fb8c06f427a94b3efa6cf575c4dd44ff16d5b7..11e397d303231a3ca454eb0615ed93d126b28bd2 100644 (file)
@@ -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
 ;;;
              (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)))))