>>>> "jpw" == John Paul Wallington
<jpw(a)shootybangbang.com> writes:
jpw> Maybe he was toying with reusing the same string-output
jpw> buffer, but that would have insane effects whenever a
jpw> `with-output-to-string' call occured within another.
Or maybe he actually did, it did, and somebody applied a quick fix
without comment in the Lisp file. Ah, yes:
2000-03-02 SL Baur <steve(a)beopen.com>
* subr.el (with-string-as-buffer-contents): Reimplement using
`with-temp-buffer'. Fixes non-unique buffer name problem, fixes
non-deletion of buffer after execution problem.
(with-output-to-string): Use unique buffer name.
Good grief, Steve. :-P
jpw> Placing BODY outside the `with-current-buffer' seems correct
jpw> as well as neat, but I wonder whether any callers
jpw> accidentally use `insert' instead of `princ' and haven't been
jpw> bitten yet.
TeX people (David Kastrup/preview-latex and whoever does reftex.el)
seem to like the idiom
(with-output-to-string
(with-current-buffer standard-output ...))
which should work right. The other callers all seem to have it right.
poe.el defmacro-maybes with-output-to-string. :-b
--
Institute of Policy and Planning Sciences
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
My nostalgia for Icon makes me forget about any of the bad things. I don't
have much nostalgia for Perl, so its faults I remember. Scott Gilbert c.l.py