-See also `with-temp-file' and `with-output-to-string'."
- (let ((temp-buffer (make-symbol "temp-buffer"))
- (multibyte (make-symbol "multibyte")))
- `(if (or (featurep 'xemacs)
- (not (boundp 'enable-multibyte-characters)))
- (with-temp-buffer ,@forms)
- (let ((,multibyte (default-value 'enable-multibyte-characters))
- ,temp-buffer)
- (unwind-protect
- (progn
- (setq-default enable-multibyte-characters nil)
- (setq ,temp-buffer
- (get-buffer-create (generate-new-buffer-name " *temp*")))
- (unwind-protect
- (with-current-buffer ,temp-buffer
- (let ((buffer-file-coding-system mm-binary-coding-system)
- (coding-system-for-read mm-binary-coding-system)
- (coding-system-for-write mm-binary-coding-system))
- ,@forms))
- (and (buffer-name ,temp-buffer)
- (kill-buffer ,temp-buffer))))
- (setq-default enable-multibyte-characters ,multibyte))))))
+Use unibyte mode for this."
+ `(let (default-enable-multibyte-characters)
+ (with-temp-buffer ,@forms)))