changeset 5762:099857a46901

(record_first_change): Check for buffer-undo-list = t. Make an undo boundary if appropriate. Set last_undo_buffer. (record_property_change): Use BUFFER, not current_buffer, when testing undo_list.
author Richard M. Stallman <rms@gnu.org>
date Thu, 03 Feb 1994 19:39:21 +0000
parents 7bea55d86ff6
children ec298224882d
files src/undo.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/undo.c	Thu Feb 03 19:18:21 1994 +0000
+++ b/src/undo.c	Thu Feb 03 19:39:21 1994 +0000
@@ -123,6 +123,14 @@
 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 @@
   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))