]> git.eshelyaron.com Git - emacs.git/commitdiff
(record_first_change): Check for buffer-undo-list = t.
authorRichard M. Stallman <rms@gnu.org>
Thu, 3 Feb 1994 19:39:21 +0000 (19:39 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 3 Feb 1994 19:39:21 +0000 (19:39 +0000)
Make an undo boundary if appropriate.  Set last_undo_buffer.
(record_property_change): Use BUFFER, not current_buffer,
when testing undo_list.

src/undo.c

index 3d71516e2bec253a79e302b1329db5e64046460b..a0e9f84f7c9a7fd124d7c60e1ca0c268d47974a3 100644 (file)
@@ -123,6 +123,14 @@ record_change (beg, length)
 record_first_change ()
 {
   Lisp_Object high, low;
+
+  if (EQ (current_buffer->undo_list, Qt))
+    return;
+
+  if (current_buffer != XBUFFER (last_undo_buffer))
+    Fundo_boundary ();
+  XSET (last_undo_buffer, Lisp_Buffer, current_buffer);
+
   XFASTINT (high) = (current_buffer->modtime >> 16) & 0xffff;
   XFASTINT (low) = current_buffer->modtime & 0xffff;
   current_buffer->undo_list = Fcons (Fcons (Qt, Fcons (high, low)), current_buffer->undo_list);
@@ -139,7 +147,7 @@ record_property_change (beg, length, prop, value, buffer)
   struct buffer *obuf = current_buffer;
   int boundary = 0;
 
-  if (EQ (current_buffer->undo_list, Qt))
+  if (EQ (XBUFFER (buffer)->undo_list, Qt))
     return;
 
   if (!EQ (buffer, last_undo_buffer))