]> git.eshelyaron.com Git - emacs.git/commitdiff
(record_delete): Save last_point_position in the undo record, rather than the
authorKarl Heuer <kwzh@gnu.org>
Thu, 3 Mar 1994 20:12:01 +0000 (20:12 +0000)
committerKarl Heuer <kwzh@gnu.org>
Thu, 3 Mar 1994 20:12:01 +0000 (20:12 +0000)
current value of point.

src/undo.c

index a0e9f84f7c9a7fd124d7c60e1ca0c268d47974a3..64f773d62c8227747b8d983632ef57ea8c146376 100644 (file)
@@ -22,6 +22,7 @@ and this notice must be preserved on all copies.  */
 #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 @@ record_delete (beg, length)
   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),