From bd6f50331c69ecafe13edaf526a7718f797559e1 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 7 Apr 1992 08:39:01 +0000 Subject: [PATCH] Change WITHIN-EDITOR? to a variable instead of a procedure, for speed. --- v7/src/edwin/bufset.scm | 6 +++--- v7/src/edwin/editor.scm | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/v7/src/edwin/bufset.scm b/v7/src/edwin/bufset.scm index 99133fcf2..889d10211 100644 --- a/v7/src/edwin/bufset.scm +++ b/v7/src/edwin/bufset.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/bufset.scm,v 1.9 1991/05/10 04:51:41 cph Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/bufset.scm,v 1.10 1992/04/07 08:39:01 cph Exp $ ;;; -;;; Copyright (c) 1986, 1989-91 Massachusetts Institute of Technology +;;; Copyright (c) 1986, 1989-92 Massachusetts Institute of Technology ;;; ;;; This material was developed by the Scheme project at the ;;; Massachusetts Institute of Technology, Department of @@ -95,7 +95,7 @@ (let ((buffer (make-buffer name (ref-variable editor-default-mode) - (if (within-editor?) + (if within-editor? (buffer-default-directory (current-buffer)) (working-directory-pathname))))) (string-table-put! (bufferset-names bufferset) name buffer) diff --git a/v7/src/edwin/editor.scm b/v7/src/edwin/editor.scm index 9c23ab050..d4ad59d92 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.219 1992/04/04 13:07:07 cph Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/editor.scm,v 1.220 1992/04/07 08:38:33 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-92 Massachusetts Institute of Technology ;;; @@ -49,7 +49,7 @@ (define (edit . args) (call-with-current-continuation (lambda (continuation) - (cond ((within-editor?) + (cond (within-editor? (error "edwin: Editor already running")) ((not edwin-editor) (apply create-editor args)) @@ -64,6 +64,7 @@ unspecific))))) (fluid-let ((editor-abort continuation) (current-editor edwin-editor) + (within-editor? true) (editor-thread (current-thread)) (editor-thread-root-continuation) (editor-initial-threads '()) @@ -100,11 +101,11 @@ message)))))))) (define (edwin . args) (apply edit args)) -(define (within-editor?) (not (unassigned? current-editor))) -(define editor-abort) (define edwin-editor false) +(define editor-abort) (define current-editor) +(define within-editor? false) (define editor-thread) (define editor-thread-root-continuation) (define editor-initial-threads) -- 2.25.1