Fix two bugs in SAVE-EDITOR-FILES.
authorChris Hanson <org/chris-hanson/cph>
Mon, 9 Nov 1992 21:02:34 +0000 (21:02 +0000)
committerChris Hanson <org/chris-hanson/cph>
Mon, 9 Nov 1992 21:02:34 +0000 (21:02 +0000)
v7/src/edwin/debuge.scm

index 356003873a1a3a563d3b1b582011ed66d4f6427f..31a2c3b7c307df3fa921b1beaaddcccabcd185e9 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Id: debuge.scm,v 1.46 1992/11/09 20:45:33 cph Exp $
+;;;    $Id: debuge.scm,v 1.47 1992/11/09 21:02:34 cph Exp $
 ;;;
 ;;;    Copyright (c) 1986, 1989-92 Massachusetts Institute of Technology
 ;;;
   (if (and (buffer-modified? buffer)
           (buffer-writeable? buffer))
       (let ((pathname
-            (merge-pathnames
-             (let ((pathname (buffer-pathname buffer)))
-               (cond ((not pathname)
-                      (and (y-or-n? "Save buffer "
-                                    (buffer-name buffer)
-                                    " (Y or N)? ")
-                           ((access prompt-for-expression
-                                    system-global-environment)
-                            "Filename")))
-                     ((integer? (pathname-version pathname))
-                      (pathname-new-version pathname 'NEWEST))
-                     (else
-                      pathname))))))
+            (let ((pathname (buffer-pathname buffer)))
+              (cond ((not pathname)
+                     (and (y-or-n? "Save buffer "
+                                   (buffer-name buffer)
+                                   " (Y or N)? ")
+                          ((access prompt-for-expression
+                                   system-global-environment)
+                           "Filename")))
+                    ((integer? (pathname-version pathname))
+                     (pathname-new-version pathname 'NEWEST))
+                    (else
+                     pathname)))))
        (if pathname
-           (let ((filename (->namestring pathname)))
+           (let* ((pathname (merge-pathnames pathname))
+                  (filename (->namestring pathname)))
              (if (or (not (file-exists? pathname))
                      (y-or-n? "File '"
                               filename