changeset 21272:b1bc69132f55

(record_delete): Record last_point_position when there's no record other than marker adjustment before undo boundary.
author Kenichi Handa <handa@m17n.org>
date Tue, 24 Mar 1998 05:41:38 +0000
parents 6262a19fadeb
children 3d9e12cf2e63
files src/undo.c
diffstat 1 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/undo.c	Tue Mar 24 05:41:22 1998 +0000
+++ b/src/undo.c	Tue Mar 24 05:41:38 1998 +0000
@@ -105,8 +105,24 @@
     Fundo_boundary ();
   XSETBUFFER (last_undo_buffer, current_buffer);
 
-  at_boundary = (CONSP (current_buffer->undo_list)
-		 && NILP (XCONS (current_buffer->undo_list)->car));
+  if (CONSP (current_buffer->undo_list))
+    {
+      /* Set AT_BOUNDARY to 1 only when we have nothing other than
+         marker adjustment before undo boundary.  */
+
+      Lisp_Object tail = current_buffer->undo_list, elt;
+
+      while (1)
+	{
+	  elt = XCONS (tail)->car;
+	  if (NILP (elt) || ! (CONSP (elt) && MARKERP (XCONS (elt)->car)))
+	    break;
+	  tail = XCONS (tail)->cdr;
+	}
+      at_boundary = NILP (elt);
+    }
+  else
+    at_boundary = 0;
 
   if (MODIFF <= SAVE_MODIFF)
     record_first_change ();