fixed bugs
original commit: b4118c69ded4c0be9750aceb8525997beade7391
This commit is contained in:
parent
bfef1823c6
commit
bd2a7be851
|
@ -23,6 +23,15 @@
|
|||
[(eq? cb (car cb-list)) (cdr cb-list)]
|
||||
[else (cons (car cb-list) (loop (cdr cb-list)))])))))
|
||||
|
||||
(define run-exit-callbacks
|
||||
(lambda ()
|
||||
(set! exit-callbacks
|
||||
(let loop ([cb-list exit-callbacks])
|
||||
(cond
|
||||
[(null? cb-list) ()]
|
||||
[(not ((car cb-list))) cb-list]
|
||||
[else (loop (cdr cb-list))])))))
|
||||
|
||||
(define -exit
|
||||
(lambda ()
|
||||
(let/ec k
|
||||
|
@ -37,12 +46,7 @@
|
|||
(string-append "Are you sure you want to " w "?")
|
||||
capW "Cancel"))))
|
||||
(k #f))
|
||||
(set! exit-callbacks
|
||||
(let loop ([cb-list exit-callbacks])
|
||||
(cond
|
||||
[(null? cb-list) ()]
|
||||
[(not ((car cb-list))) cb-list]
|
||||
[else (loop (cdr cb-list))])))
|
||||
(run-exit-callbacks)
|
||||
(if (null? exit-callbacks)
|
||||
(begin (when mred:debug:exit?
|
||||
(exit))
|
||||
|
|
Loading…
Reference in New Issue
Block a user