I had this code:
(set-buffer (get-buffer-create "foo"))
(let (...) ...)
(select-frame (make-frame ...))
I changed it to this code:
(with-output-to-temp-buffer "foo" ...)
(let ((temp-buffer-setup-hook nil)
(temp-buffer-show-functions nil)
...)
...)
(select-window (get-buffer-window "foo" 'visible))
(modify-frame-parameters (selected-frame) ...)
The rest of the code (i.e. "...") is identical. The latter code runs about
twice as fast (clock time)! I don't use any print functions inside the
with-* - I use only `insert', so I wouldn't think that with-* would be of
any special benefit here.
I don't understand this. A glance at the C code makes me think that
with-output-to-temp-buffer would only do more, not less, stuff.