emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: with-temp-buffer: should we set buffer-undo-list to t?


From: Noam Postavsky
Subject: Re: with-temp-buffer: should we set buffer-undo-list to t?
Date: Sun, 12 Mar 2017 09:38:16 -0400

On Sat, Mar 11, 2017 at 6:52 PM,  <address@hidden> wrote:
> Would setting buffer-undo-list to t in the macro  definition of
> with-temp-buffer help save some work?
>
> At present we dont do this, and as a consequence, operations within
> body of with-tem-buffer may well push entries on the undo stack that
> just get thrown away.

Seems it already happens:

(with-temp-buffer
  buffer-undo-list) ;=> t

get-buffer-create has this code:

  bset_undo_list (b, SREF (name, 0) != ' ' ? Qnil : Qt);

So buffers starting with a space have the undo list set to t.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]