Merge branch 'master' into pucked.
authorMatt Birkholz <matt@birchwood-abbey.net>
Thu, 21 Jun 2018 19:43:08 +0000 (12:43 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Thu, 21 Jun 2018 19:43:08 +0000 (12:43 -0700)
1  2 
src/edwin/editor.scm
src/edwin/filcom.scm
src/edwin/intmod.scm
src/runtime/command-line.scm
src/runtime/make.scm
src/runtime/mit-macros.scm
src/runtime/runtime.pkg

Simple merge
Simple merge
index 35f0419d9419824e46330112db8bf1f4878aef61,b13526a735f94dc695701ff8836d032f5bae22c4..d87a30fabf8e45f7a9161cbfb57b39c0a683d16f
@@@ -114,39 -114,31 +114,37 @@@ evaluated in the specified inferior REP
        (buffer-put! buffer 'MAJOR-MODE-LOCKED #t))
    (if (environment? environment)
        (local-set-variable! scheme-environment environment buffer))
 -  (create-thread editor-thread-root-continuation
 -    (lambda ()
 -      (let ((port
 -           (make-interface-port buffer
 -                                (let ((thread (current-thread)))
 -                                  (detach-thread thread)
 -                                  thread))))
 -      (attach-buffer-interface-port! buffer port)
 -      (parameterize ((param:exit-hook inferior-repl/exit)
 -                     (param:suspend-hook inferior-repl/suspend))
 -        (dynamic-wind
 -         (lambda () unspecific)
 -         (lambda ()
 -           (repl/start (make-repl #f
 -                                  port
 -                                  environment
 -                                  #f
 -                                  `((ERROR-DECISION ,error-decision))
 -                                  user-initial-prompt)
 -                       (make-init-message message)))
 -         (lambda ()
 -           (signal-thread-event editor-thread
 -             (lambda ()
 -               (unwind-inferior-repl-buffer buffer))))))))
 -    buffer))
 +  (let ((return (make-thread-queue 1))
 +      (proceed (make-thread-queue 1)))
 +    (create-thread editor-thread-root-continuation
 +      (lambda ()
 +      (let ((port
 +             (make-interface-port buffer
 +                                  (let ((thread (current-thread)))
 +                                    (detach-thread thread)
 +                                    thread))))
 +        (thread-queue/queue! return port) ;pass port to editor-thread
 +        (thread-queue/dequeue! proceed) ;wait for port to be attached
-         (parameterize* (list (cons param:exit-hook inferior-repl/exit)
-                              (cons param:suspend-hook inferior-repl/suspend))
-           (lambda ()
-             (dynamic-wind
-              (lambda () unspecific)
-              (lambda ()
-                (repl/start
-                 (make-repl #f
-                            port
-                            environment
-                            #f
-                            `((ERROR-DECISION ,error-decision))
-                            user-initial-prompt)
-                 (make-init-message message)))
-              (lambda ()
-                (signal-thread-event editor-thread
-                  (lambda ()
-                    (unwind-inferior-repl-buffer buffer)))))))))
++        (parameterize ((param:exit-hook inferior-repl/exit)
++                       (param:suspend-hook inferior-repl/suspend))
++          (dynamic-wind
++           (lambda () unspecific)
++           (lambda ()
++             (repl/start (make-repl #f
++                                    port
++                                    environment
++                                    #f
++                                    `((ERROR-DECISION ,error-decision))
++                                    user-initial-prompt)
++                         (make-init-message message)))
++           (lambda ()
++             (signal-thread-event editor-thread
++               (lambda ()
++                 (unwind-inferior-repl-buffer buffer))))))))
 +      buffer)
 +    (let ((port (thread-queue/dequeue! return)))
 +      (attach-buffer-interface-port! buffer port)
 +      (thread-queue/queue! proceed 'ready))))
  
  (define (make-init-message message)
    (if message
Simple merge
Simple merge
Simple merge
Simple merge