diff options
| author | Richard M. Stallman | 1992-10-03 02:12:40 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1992-10-03 02:12:40 +0000 |
| commit | f28f04cca2914a9fb8178900d60a0a0654670fe1 (patch) | |
| tree | fdd538714277fdd0f59fa5ec47ff5c19b3d53685 /src | |
| parent | 45288343f0ac5a43da5fe417db07626357fd2041 (diff) | |
| download | emacs-f28f04cca2914a9fb8178900d60a0a0654670fe1.tar.gz emacs-f28f04cca2914a9fb8178900d60a0a0654670fe1.zip | |
(Fprimitive_undo): When undoing an insert, move point and then delete.
Diffstat (limited to 'src')
| -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.") | |||
| 306 | if (XINT (car) < BEGV | 306 | if (XINT (car) < BEGV |
| 307 | || XINT (cdr) > ZV) | 307 | || XINT (cdr) > ZV) |
| 308 | error ("Changes to be undone are outside visible portion of buffer"); | 308 | error ("Changes to be undone are outside visible portion of buffer"); |
| 309 | Fdelete_region (car, cdr); | 309 | /* Set point first thing, so that undoing this undo |
| 310 | does not send point back to where it is now. */ | ||
| 310 | Fgoto_char (car); | 311 | Fgoto_char (car); |
| 312 | Fdelete_region (car, cdr); | ||
| 311 | } | 313 | } |
| 312 | else if (XTYPE (car) == Lisp_String && XTYPE (cdr) == Lisp_Int) | 314 | else if (XTYPE (car) == Lisp_String && XTYPE (cdr) == Lisp_Int) |
| 313 | { | 315 | { |