Make edit and edwin take arguments and pass them along to
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Thu, 1 Aug 1991 22:55:04 +0000 (22:55 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Thu, 1 Aug 1991 22:55:04 +0000 (22:55 +0000)
create-editor.

v7/src/edwin/editor.scm

index 0f33de28fb76586703e2d804d8560bec85e7f29d..c13952447f53dca6ca7af2908f84627bcf79786a 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/editor.scm,v 1.205 1991/05/18 03:25:12 cph Exp $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/editor.scm,v 1.206 1991/08/01 22:55:04 jinx Exp $
 ;;;
 ;;;    Copyright (c) 1986, 1989-91 Massachusetts Institute of Technology
 ;;;
 
 (declare (usual-integrations))
 \f
-(define (edit)
-  (if (not edwin-editor) (create-editor))
+(define (edit . args)
+  (cond ((not edwin-editor)
+        (apply create-editor args))
+       ((not (null? args))
+        (error "edwin: Arguments ignored when re-entering editor" args)))
   (call-with-current-continuation
    (lambda (continuation)
      (fluid-let ((editor-abort continuation)
                  message
                  spawn-child)))))
 
-(define (edwin) (edit))
+(define (edwin . args) (apply edit args))
 (define (within-editor?) (not (unassigned? current-editor)))
 
 (define editor-abort)