[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guaranteed undo boundaries
From: |
Stefan Monnier |
Subject: |
Re: guaranteed undo boundaries |
Date: |
Thu, 07 Feb 2013 08:45:20 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> Possibly this is already guaranteed, merely this could be spelled out
> more explicitly in some docstring / the elisp manual. Possibly, I am
> missing something else.
By default, undo boundaries are pushed after each command run by
the user. But every command/function is free to adjust this behavior by
calling undo-boundary internally (or by removing the boundary, as does
self-insert-command).
So there's no such guarantee.
What you can do, OTOH, is something like
(undo-boundary)
(let ((bottom buffer-undo-list))
<do-db-update>
(remove-all-boundaries-between buffer-undo-list bottom))
-- Stefan