diff --git a/collects/slideshow/start.rkt b/collects/slideshow/start.rkt index bce7e03708..fbb50dfdfe 100644 --- a/collects/slideshow/start.rkt +++ b/collects/slideshow/start.rkt @@ -65,8 +65,7 @@ (lambda (who where-name where-port-num mode) (error 'slideshow "slide program attempted to make a network connection"))))) - (dynamic-require (path->complete-path content) #f) - (done-making-slides)) + (dynamic-require (path->complete-path content) #f)) (when (file-to-load) (load-content (string->path (file-to-load)))) diff --git a/collects/slideshow/viewer.rkt b/collects/slideshow/viewer.rkt index 59f833da21..ecd36fa9ba 100644 --- a/collects/slideshow/viewer.rkt +++ b/collects/slideshow/viewer.rkt @@ -1223,6 +1223,14 @@ (when config:printing? (do-print))) + (when config:printing? + ;; Just before exiting normally, print the slides: + (let ([h (executable-yield-handler)]) + (executable-yield-handler + (lambda (v) + (viewer:done-making-slides) + (h v))))) + (let ([eh (uncaught-exception-handler)]) (uncaught-exception-handler (lambda (exn)