changeset 6180:d369907be635

(record_delete): Save last_point_position in the undo record, rather than the current value of point.
author Karl Heuer <kwzh@gnu.org>
date Thu, 03 Mar 1994 20:12:01 +0000
parents e2bb2d0b8a00
children dd271c6b4e56
files src/undo.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/undo.c	Thu Mar 03 20:08:49 1994 +0000
+++ b/src/undo.c	Thu Mar 03 20:12:01 1994 +0000
@@ -22,6 +22,7 @@
 #include <config.h>
 #include "lisp.h"
 #include "buffer.h"
+#include "commands.h"
 
 /* Last buffer for which undo information was recorded.  */
 Lisp_Object last_undo_buffer;
@@ -95,10 +96,10 @@
   XFASTINT (lbeg) = beg;
   XFASTINT (lend) = beg + length;
 
-  /* If point isn't at start of deleted range, record where it is.  */
-  if (PT != XFASTINT (sbeg))
+  /* If point wasn't at start of deleted range, record where it was.  */
+  if (last_point_position != XFASTINT (sbeg))
     current_buffer->undo_list
-      = Fcons (make_number (PT), current_buffer->undo_list);
+      = Fcons (make_number (last_point_position), current_buffer->undo_list);
 
   current_buffer->undo_list
     = Fcons (Fcons (Fbuffer_substring (lbeg, lend), sbeg),