Change WITHIN-EDITOR? to a variable instead of a procedure, for speed.
authorChris Hanson <org/chris-hanson/cph>
Tue, 7 Apr 1992 08:39:01 +0000 (08:39 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 7 Apr 1992 08:39:01 +0000 (08:39 +0000)
v7/src/edwin/bufset.scm
v7/src/edwin/editor.scm

index 99133fcf2b21ce0b7cf39cab0d7921fb32f02df9..889d102115afec1fd8bd741f7993a7406e671789 100644 (file)
@@ -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)
index 9c23ab050c46183a7d0c7c580c24188f77e6968a..d4ad59d926fcf636f35fd3a5721f066b7c0b947a 100644 (file)
@@ -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 '())
              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)