From f28f04cca2914a9fb8178900d60a0a0654670fe1 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 3 Oct 1992 02:12:40 +0000 Subject: (Fprimitive_undo): When undoing an insert, move point and then delete. --- src/undo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/undo.c') 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) { -- cgit v1.2.1