with-gtk-interrupts-enabled
with-gtk-interrupts-disabled))
unspecific)
+
+(define (spawn-edit . args)
+ (cond (edwin-editor
+ (error "Edwin is already running."))
+ ((let ((types (editor-display-types)))
+ (and (pair? types)
+ (eq? 'console (display-type/name (car types)))
+ (null? (cdr types))))
+ (error "Edwin must run on the console."))
+ (else
+ (call-with-current-continuation
+ (lambda (continue)
+ (detach-thread
+ (create-thread continue
+ (lambda ()
+ (set! editor-can-exit? #t)
+ (set! paranoid-exit? #t)
+ (apply edit args)
+ (stop-current-thread)))))))))
\f
(define (update-widgets screen)
(%trace "; update-widgets "screen"\n")