(set! (access write-result:undefined-value-is-special?
(->environment '(RUNTIME USER-INTERFACE)))
#f)
-(set! hook/exit (lambda (integer) integer (warn "EXIT has been disabled.")))
-(set! hook/quit (lambda () (warn "QUIT has been disabled.")))
+(set-fluid! hook/exit (lambda (integer) integer
+ (warn "EXIT has been disabled.")))
+(set-fluid! hook/%exit (lambda (integer) integer
+ (warn "%EXIT has been disabled.")))
+(set-fluid! hook/quit (lambda () (warn "QUIT has been disabled.")))
(let ((edwin-env (->environment '(EDWIN)))
(student-env (->environment '(STUDENT))))
(detach-thread thread)
thread))))
(attach-buffer-interface-port! buffer port)
- (fluid-let ((%exit inferior-repl/%exit)
- (quit inferior-repl/quit))
+ (let-fluids hook/%exit inferior-repl/%exit
+ hook/quit inferior-repl/quit
+ (lambda ()
(dynamic-wind
(lambda () unspecific)
(lambda ()
(lambda ()
(signal-thread-event editor-thread
(lambda ()
- (unwind-inferior-repl-buffer buffer))))))))))
+ (unwind-inferior-repl-buffer buffer)))))))))))
(define (make-init-message message)
(if message
((#x00020100 #x0004030000020100) #f)
(else (error "Unable to determine endianness of host."))))
(add-secondary-gc-daemon! clean-obarray)
+ (set! hook/exit (make-fluid default/exit))
+ (set! hook/%exit (make-fluid default/%exit))
+ (set! hook/quit (make-fluid default/quit))
;; Kludge until the next released version, to avoid a bootstrapping
;; failure.
(set! ephemeron-type (microcode-type 'EPHEMERON))
(wait-loop)))))
(define (exit #!optional integer)
- (hook/exit (if (default-object? integer) #f integer)))
+ ((fluid hook/exit) (if (default-object? integer) #f integer)))
(define (default/exit integer)
(if (prompt-for-confirmation "Kill Scheme")
(%exit integer)))
-(define hook/exit default/exit)
+(define hook/exit)
+(define hook/%exit)
(define (%exit #!optional integer)
+ ((fluid hook/%exit) integer))
+
+(define (default/%exit #!optional integer)
(event-distributor/invoke! event:before-exit)
(if (or (default-object? integer)
(not integer))
((ucode-primitive exit-with-value 1) integer)))
(define (quit)
- (hook/quit))
+ ((fluid hook/quit)))
(define (%quit)
(with-absolutely-no-interrupts (ucode-primitive halt))
unspecific)
(define default/quit %quit)
-(define hook/quit default/quit)
+(define hook/quit)
(define user-initial-environment
(*make-environment system-global-environment