Note the "mods from Stig". Stig Hackvan nee Jonathan
Stigelman is an
occasionally brilliant, more usually flaky, XEmacs hacker. He hasn't
done much in years. Anything flagged with a comment from Stig should
be considered warily. It's often worthwhile to figure out why he
dorks around, but it's no surprise if you never do figure it out. :-)
Maybe he was toying with reusing the same string-output buffer, but
that would have insane effects whenever a `with-output-to-string' call
occured within another.
jpw> Also, the GNU version will only return what was printed
to
jpw> `standard-output'; BODY can still modify the current buffer,
jpw> which seems neat.
Leaking temp buffers sucks. I won't promise to put this in 21.4, but
if the compatibility package doesn't get off the ground quickly, I'll
give a patch synching to GNU very strong consideration. Please test
in 21.5 first.
Placing BODY outside the `with-current-buffer' seems correct as well
as neat, but I wonder whether any callers accidentally use `insert'
instead of `princ' and haven't been bitten yet.
--
John Paul Wallington