Undoing the insertion of a character while the region is active (and delete-selection-mode
is non-nil) requires two steps: the first to undo the insertion and the second to restore the deleted region. Is it possible to undo both steps with a single call to undo
instead?
Asked
Active
Viewed 14 times
0

Arch Stanton
- 1,525
- 9
- 22
-
Just curious: Why would you want `undo` to (always) do that? Do you never want to just undo the insertion? (The defined behavior lets you undo only the insertion or undo both the insertion and the deletion.) – Drew Jan 29 '22 at 18:38
-
@Drew You've got a point. But in the end I usually want to undo both steps at once. I see it as one operation and it still catches me kind of off guard that I need to undo again after the first time. – Arch Stanton Jan 29 '22 at 20:34
-
Hopefully someone will provide a good answer as to how to provide this, then. – Drew Jan 29 '22 at 21:38