From: Chris Hanson Date: Wed, 27 Oct 1993 02:23:21 +0000 (+0000) Subject: Change PROMPT-FOR-EXPRESSION so that variable-name completion in the X-Git-Tag: 20090517-FFI~7674 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=abe25bae97b356a3a5faaae00ebdf3fdfd583812;p=mit-scheme.git Change PROMPT-FOR-EXPRESSION so that variable-name completion in the typein buffer uses the environment of the buffer that was current when PROMPT-FOR-EXPRESSION was called. --- diff --git a/v7/src/edwin/evlcom.scm b/v7/src/edwin/evlcom.scm index c712422e5..dfe87d920 100644 --- a/v7/src/edwin/evlcom.scm +++ b/v7/src/edwin/evlcom.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: evlcom.scm,v 1.47 1993/10/26 00:37:59 cph Exp $ +;;; $Id: evlcom.scm,v 1.48 1993/10/27 02:23:21 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-93 Massachusetts Institute of Technology ;;; @@ -321,7 +321,15 @@ Has no effect if evaluate-in-inferior-repl is false." (if (eq? default-type 'VISIBLE-DEFAULT) 'INVISIBLE-DEFAULT default-type) - (ref-mode-object prompt-for-expression))))) + (let ((environment (evaluation-environment #f))) + (lambda (buffer) + (set-buffer-major-mode! buffer + (ref-mode-object prompt-for-expression)) + ;; This sets up the correct environment in the typein buffer + ;; so that completion of variables works right. + (define-variable-local-value! buffer + (ref-variable-object scheme-environment) + environment))))))) (define (read-from-string string) (bind-condition-handler (list condition-type:error) evaluation-error-handler