From 14906fc280e9fceb8533d533c13b01c4ca2b8e37 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 13 Mar 1992 10:08:11 +0000 Subject: [PATCH] Change EDIT to set up the EDITOR-ABORT continuation correctly when reentering the editor after a suspend. Previously it was returning to the same initial continuation whenever the editor was stopped. --- v7/src/edwin/editor.scm | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/v7/src/edwin/editor.scm b/v7/src/edwin/editor.scm index e044656a3..12fa8956f 100644 --- a/v7/src/edwin/editor.scm +++ b/v7/src/edwin/editor.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/editor.scm,v 1.217 1992/02/19 00:05:11 cph Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/editor.scm,v 1.218 1992/03/13 10:08:11 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-92 Massachusetts Institute of Technology ;;; @@ -47,18 +47,21 @@ (declare (usual-integrations)) (define (edit . args) - (cond ((within-editor?) - (error "edwin: Editor already running")) - ((not edwin-editor) - (apply create-editor args)) - ((not (null? args)) - (error "edwin: Arguments ignored when re-entering editor" args)) - (edwin-continuation - => (lambda (continuation) - (set! edwin-continuation false) - (continuation unspecific)))) (call-with-current-continuation (lambda (continuation) + (cond ((within-editor?) + (error "edwin: Editor already running")) + ((not edwin-editor) + (apply create-editor args)) + ((not (null? args)) + (error "edwin: Arguments ignored when re-entering editor" args)) + (edwin-continuation + => (lambda (restart) + (set! edwin-continuation false) + (within-continuation restart + (lambda () + (set! editor-abort continuation) + unspecific))))) (fluid-let ((editor-abort continuation) (current-editor edwin-editor) (editor-thread (current-thread)) -- 2.25.1