Make EVALUATE-REGION return the value of the last expression it
authorArthur Gleckler <edu/mit/csail/zurich/arthur>
Thu, 12 Sep 1991 23:31:52 +0000 (23:31 +0000)
committerArthur Gleckler <edu/mit/csail/zurich/arthur>
Thu, 12 Sep 1991 23:31:52 +0000 (23:31 +0000)
evaluates, or the value of UNSPECIFIC if there are no expressions.
It had been returning UNSPECIFIC always, but the Edwin Debugger needs
to be able to find out the value of an evaluation after going through
the standard evaluation mechanism (for the purposes of the

  CONTINUATION-BROWSER-RETURN-FROM,
  CONTINUATION-BROWSER-RETURN-TO, and
  CONTINUATION-BROWSER-RETRY

debugger commands).

v7/src/edwin/evlcom.scm

index 31c0859749a8a3405351a35ed7c0f47bb4e02e0d..7cac50cef4fdaaf83173078bb1ba84cd9fb90689 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/evlcom.scm,v 1.28 1991/08/28 22:28:42 arthur Exp $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/evlcom.scm,v 1.29 1991/09/12 23:31:52 arthur Exp $
 ;;;
 ;;;    Copyright (c) 1986, 1989-91 Massachusetts Institute of Technology
 ;;;
@@ -259,13 +259,13 @@ may be available.  The following commands are special to this mode:
            evaluation-error-handler
          (letrec
              ((loop
-               (lambda ()
+               (lambda (result)
                  (let ((sexp (read)))
-                   (if (not (eof-object? sexp))
-                       (begin
-                         (editor-eval sexp environment)
-                         (loop)))))))
-           loop))))))
+                   (if (eof-object? sexp)
+                       result
+                       (loop (editor-eval sexp environment)))))))
+           (lambda ()
+             (loop unspecific))))))))
 
 (define (evaluation-environment argument)
   (let ((->environment