[racket] what is the purpose of installing a handler for the default continuation prompt in racket/load?

From: Andrew Wilcox (andrew.wilcox at gmail.com)
Date: Wed Apr 20 11:26:29 EDT 2011

In collects/racket/load.rkt, strip-context-and-eval installs a handler
for the default continuation prompt with
call-with-continuation-prompt... and then the handler simply calls
abort-current-continuation with the default continuation prompt again.

To my uneducated eye, this looks like a no-op: if it were like
catching and re-raising an exception, it would be like catching an
exception and raising it again without doing anything else.

What does this code do?  Or, to put the question in another way, what
wouldn't work right if strip-context-and-eval were written without the

(define (strip-context-and-eval e)
  (let ([ns (current-namespace)])
        (lambda ()
          (current-namespace namespace))
        (lambda ()
          (eval-syntax (namespace-syntax-introduce
                        (strip-context e))))
        (lambda ()
          (set! namespace (current-namespace))
          (current-namespace ns)))))

Posted on the users mailing list.