<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Laurent wrote at 05/01/2012 07:30 AM:<br>
<blockquote
cite="mid:CABNTSaHwsgFLV96kXSsDb6b=nKs74UKKbYXAzWpyjCQgjZ0E_A@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<div>FWIW, the docs for defform say:<br>
"The typesetting of <span class="RktVar">form-datum</span>, <span
class="RktVar">subform-datum</span>, and
<span class="RktVar">contract-expr-datum</span> preserves the source
layout, like
<span class="RktSym"><a moz-do-not-send="true"
href="http://docs.racket-lang.org/scribble/scribble_manual_code.html?q=defthing#%28form._%28%28lib._scribble/manual..rkt%29._racketblock%29%29"
class="RktStxLink">racketblock</a></span>."<br>
</div>
</div>
</blockquote>
<br>
Thank you. I spent some extra time on this unpaid work because I
wanted to give the kids a good demonstration of why it is important to
remember that documentation often answers questions.<br>
<br>
Incidentally, the workaround for my problem was this:<br>
<br>
(define (datum->pretty-syntax datum<br>
#:source-name (source-name #f)<br>
#:columns (columns 80))<br>
(let ((in (open-input-string<br>
(let ((os (open-output-string)))<br>
(parameterize ((pretty-print-columns
columns)<br>
(pretty-print-depth #f)<br>
(pretty-print-exact-as-decimal #f)<br>
(pretty-print-.-symbol-without-bars #f)<br>
(pretty-print-show-inexactness #f))<br>
(pretty-write datum os))<br>
(get-output-string os)))))<br>
(port-count-lines! in)<br>
(read-syntax source-name in)))<br>
<br>
Neil V.<br>
<br>
<div class="moz-signature">-- <br>
<a class="moz-txt-link-freetext" href="http://www.neilvandyke.org/">http://www.neilvandyke.org/</a>
</div>
</body>
</html>