From 6adabd911e3f0332e32d4903f991eb0e1d2e5cc9 Mon Sep 17 00:00:00 2001 From: "Guillermo J. Rozas" Date: Thu, 25 Feb 1993 08:52:48 +0000 Subject: [PATCH] Directory must be passed to os/quit. By the time it is invoked, the code is not running in the context of the editor. --- v7/src/edwin/dos.scm | 8 +++----- v7/src/edwin/editor.scm | 5 +++-- v7/src/edwin/unix.scm | 6 ++++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/v7/src/edwin/dos.scm b/v7/src/edwin/dos.scm index e6a0c2149..65f7f2388 100644 --- a/v7/src/edwin/dos.scm +++ b/v7/src/edwin/dos.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: dos.scm,v 1.8 1993/02/25 02:42:56 gjr Exp $ +;;; $Id: dos.scm,v 1.9 1993/02/25 08:51:55 gjr Exp $ ;;; ;;; Copyright (c) 1992-1993 Massachusetts Institute of Technology ;;; @@ -460,12 +460,10 @@ Includes the new backup. Must be > 0." (define (os/scheme-can-quit?) true) -(define (os/quit) +(define (os/quit dir) (without-interrupts (lambda () - (with-real-working-directory-pathname - (buffer-default-directory (current-buffer)) - %quit)))) + (with-real-working-directory-pathname dir %quit)))) (define (with-real-working-directory-pathname dir thunk) (let ((inside dir) diff --git a/v7/src/edwin/editor.scm b/v7/src/edwin/editor.scm index 59ce68108..db1a2206b 100644 --- a/v7/src/edwin/editor.scm +++ b/v7/src/edwin/editor.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: editor.scm,v 1.225 1993/02/25 02:43:42 gjr Exp $ +;;; $Id: editor.scm,v 1.226 1993/02/25 08:52:48 gjr Exp $ ;;; ;;; Copyright (c) 1986, 1989-1993 Massachusetts Institute of Technology ;;; @@ -342,7 +342,8 @@ This does not affect editor errors or evaluation errors." (quit-editor-and (lambda () *the-non-printing-object*))) (define (quit-scheme) - (quit-editor-and (lambda () (os/quit) (edit)))) + (let ((dir (buffer-default-directory (current-buffer)))) + (quit-editor-and (lambda () (os/quit dir) (edit))))) (define (quit-editor-and thunk) (call-with-current-continuation diff --git a/v7/src/edwin/unix.scm b/v7/src/edwin/unix.scm index 916434475..dd998c40f 100644 --- a/v7/src/edwin/unix.scm +++ b/v7/src/edwin/unix.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: unix.scm,v 1.33 1993/02/25 02:43:08 gjr Exp $ +;;; $Id: unix.scm,v 1.34 1993/02/25 08:52:14 gjr Exp $ ;;; ;;; Copyright (c) 1989-1993 Massachusetts Institute of Technology ;;; @@ -556,4 +556,6 @@ CANNOT contain the 'F' option." (define (os/scheme-can-quit?) (subprocess-job-control-available?)) -(define os/quit %quit) \ No newline at end of file +(define (os/quit dir) + dir ; ignored + (%quit)) \ No newline at end of file -- 2.25.1