From 2f33f38ac4e749b304784a26f8e63767e760fa4b Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Sat, 19 Aug 2000 12:33:00 +0000 Subject: [PATCH] (record_first_change, record_marker_adjustment): Don'use XBUFFER on last_undo_buffer which might not be a buffer. --- src/undo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/undo.c b/src/undo.c index 49dc4453d11..e2e4749c6a3 100644 --- a/src/undo.c +++ b/src/undo.c @@ -167,7 +167,8 @@ record_marker_adjustment (marker, adjustment) 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 @@ record_first_change () 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); -- 2.39.2