From 1407baa196bccb352b3f9d137000b8b547afc373 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 31 Jan 1999 04:09:21 +0000 Subject: [PATCH] Fix bug: when evaluate-in-inferior-repl true, and there's no repl buffer, an command requiring evaluation would fail. --- v7/src/edwin/evlcom.scm | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/v7/src/edwin/evlcom.scm b/v7/src/edwin/evlcom.scm index 6670ad4f2..3924c235e 100644 --- a/v7/src/edwin/evlcom.scm +++ b/v7/src/edwin/evlcom.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: evlcom.scm,v 1.60 1999/01/28 03:59:51 cph Exp $ +;;; $Id: evlcom.scm,v 1.61 1999/01/31 04:09:21 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-1999 Massachusetts Institute of Technology ;;; @@ -374,14 +374,16 @@ Has no effect if evaluate-in-inferior-repl is false." (editor-error "Package not loaded: " object)))))))) (let ((environment (ref-variable scheme-environment buffer))) (if (eq? 'DEFAULT environment) - (if (ref-variable evaluate-in-inferior-repl buffer) - (let ((environment - (ref-variable scheme-environment - (current-repl-buffer buffer)))) - (if (eq? 'DEFAULT environment) - (nearest-repl/environment) - (non-default environment))) - (nearest-repl/environment)) + (let ((repl-buffer + (and (ref-variable evaluate-in-inferior-repl buffer) + (current-repl-buffer* buffer)))) + (if repl-buffer + (let ((environment + (ref-variable scheme-environment repl-buffer))) + (if (eq? 'DEFAULT environment) + (nearest-repl/environment) + (non-default environment))) + (nearest-repl/environment))) (non-default environment))))) (define (evaluation-syntax-table buffer environment) -- 2.25.1