Lars Hansen <[EMAIL PROTECTED]> writes:

> Lars Hansen wrote:
>
>>I suggest to use with-temp-buffer (and buffer-disable-undo)
>>  
>>
> Does it ever make sense to save undo information in a temporary buffer?
> If not, I suggest to disable it in with-temp-buffer.
> Patch attached.
> *** subr.el~  2006-05-12 08:24:10.000000000 +0200
> --- subr.el   2006-05-12 12:40:59.575290323 +0200
> ***************
> *** 2220,2226 ****
>   See also `with-temp-file' and `with-output-to-string'."
>     (declare (indent 0) (debug t))
>     (let ((temp-buffer (make-symbol "temp-buffer")))
> !     `(let ((,temp-buffer (generate-new-buffer " *temp*")))
>          (unwind-protect
>          (with-current-buffer ,temp-buffer
>            ,@body)
> --- 2220,2227 ----
>   See also `with-temp-file' and `with-output-to-string'."
>     (declare (indent 0) (debug t))
>     (let ((temp-buffer (make-symbol "temp-buffer")))
> !     `(let ((,temp-buffer (generate-new-buffer " *temp*"))
> !            (buffer-undo-list t))
>          (unwind-protect
>          (with-current-buffer ,temp-buffer
>            ,@body)

This won't disable undo in the temp buffer, you'd need to move that below
with-current-buffer.

Andreas.

-- 
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to