[Top][All Lists]

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

Re: undo refactoring

From: Stefan Monnier
Subject: Re: undo refactoring
Date: Tue, 05 Jul 2016 17:50:28 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> Why not just do

>       bset_undo_list (current_buffer,
>                       Fcons (Qnil, BVAR (current_buffer, undo_list)));

> and remove all references to pending_boundary (and therefore
> `prepare_record` which is now rather badly named)? Or am I missing
> something

IIUC, the reason for this was so as to avoid an inf-loop when malloc
fails (for lack of memory).

The particular issue was that it was OK for a command to fail because of
malloc failure, but it was not OK for the read-eval-loop itself to fail
before having the opportunity to run another command.

My impression is that this design goal has been ignored for much too
long, so I don't think Emacs behaves this way any more.  And instead we
have now other ways to handle the memory-full situation (such as the
extra memory that's pre-allocated and then released in case the memory
is full).

IOW, I'd be surprised if getting rid of this quirk would ever lead to
a visible change in Emacs's behavior nowadays.


reply via email to

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