diff options
author | Richard M. Stallman <rms@gnu.org> | 1992-10-03 02:12:40 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1992-10-03 02:12:40 +0000 |
commit | f28f04cca2914a9fb8178900d60a0a0654670fe1 (patch) | |
tree | fdd538714277fdd0f59fa5ec47ff5c19b3d53685 /src/undo.c | |
parent | 45288343f0ac5a43da5fe417db07626357fd2041 (diff) | |
download | emacs-f28f04cca2914a9fb8178900d60a0a0654670fe1.tar.gz |
(Fprimitive_undo): When undoing an insert, move point and then delete.
Diffstat (limited to 'src/undo.c')
-rw-r--r-- | src/undo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/undo.c b/src/undo.c index b966ab3e79b..bc59c25a62d 100644 --- a/src/undo.c +++ b/src/undo.c @@ -306,8 +306,10 @@ Return what remains of the list.") if (XINT (car) < BEGV || XINT (cdr) > ZV) error ("Changes to be undone are outside visible portion of buffer"); - Fdelete_region (car, cdr); + /* Set point first thing, so that undoing this undo + does not send point back to where it is now. */ Fgoto_char (car); + Fdelete_region (car, cdr); } else if (XTYPE (car) == Lisp_String && XTYPE (cdr) == Lisp_Int) { |