changeset 30961:78ce106d272e

(record_first_change, record_marker_adjustment): Don'use XBUFFER on last_undo_buffer which might not be a buffer.
author Gerd Moellmann <gerd@gnu.org>
date Sat, 19 Aug 2000 12:33:00 +0000
parents c598e9bfdce2
children b309b17a6025
files src/undo.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/undo.c	Sat Aug 19 01:59:21 2000 +0000
+++ b/src/undo.c	Sat Aug 19 12:33:00 2000 +0000
@@ -167,7 +167,8 @@
   if (NILP (pending_boundary))
     pending_boundary = Fcons (Qnil, Qnil);
 
-  if (current_buffer != XBUFFER (last_undo_buffer))
+  if (!BUFFERP (last_undo_buffer) 
+      || current_buffer != XBUFFER (last_undo_buffer))
     Fundo_boundary ();
   XSETBUFFER (last_undo_buffer, current_buffer);
 
@@ -201,7 +202,8 @@
   if (EQ (current_buffer->undo_list, Qt))
     return;
 
-  if (current_buffer != XBUFFER (last_undo_buffer))
+  if (!BUFFERP (last_undo_buffer)
+      || current_buffer != XBUFFER (last_undo_buffer))
     Fundo_boundary ();
   XSETBUFFER (last_undo_buffer, current_buffer);