aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/undo.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/undo.c b/src/undo.c
index af57c4352b1..ceaf3b421d2 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -105,8 +105,24 @@ record_delete (beg, string)
105 Fundo_boundary (); 105 Fundo_boundary ();
106 XSETBUFFER (last_undo_buffer, current_buffer); 106 XSETBUFFER (last_undo_buffer, current_buffer);
107 107
108 at_boundary = (CONSP (current_buffer->undo_list) 108 if (CONSP (current_buffer->undo_list))
109 && NILP (XCONS (current_buffer->undo_list)->car)); 109 {
110 /* Set AT_BOUNDARY to 1 only when we have nothing other than
111 marker adjustment before undo boundary. */
112
113 Lisp_Object tail = current_buffer->undo_list, elt;
114
115 while (1)
116 {
117 elt = XCONS (tail)->car;
118 if (NILP (elt) || ! (CONSP (elt) && MARKERP (XCONS (elt)->car)))
119 break;
120 tail = XCONS (tail)->cdr;
121 }
122 at_boundary = NILP (elt);
123 }
124 else
125 at_boundary = 0;
110 126
111 if (MODIFF <= SAVE_MODIFF) 127 if (MODIFF <= SAVE_MODIFF)
112 record_first_change (); 128 record_first_change ();