[plt-scheme] namespaces in tex2page

From: Anton van Straaten (anton at appsolutions.com)
Date: Tue Apr 13 15:20:59 EDT 2004

The source to the tex2page module as distributed with DrScheme looks like
this:

(module tex2page mzscheme
  (require (lib "etc.ss"))
  (provide tex2page)
  (define
   tex2page
   (lambda (f)
     (parameterize ((current-namespace (make-namespace)))
       (namespace-require `(lib "tex2page-aux.ss" "tex2page"))
       ((namespace-variable-value 'tex2page) f)))))

Am I correct in assuming that the purpose of this code is to make the
tex2page code reentrant, since tex2page relies on a number of mutable global
variables which otherwise would prevent concurrent use?  Or is there some
other purpose to the above?

Anton



Posted on the users mailing list.