aboutsummaryrefslogtreecommitdiffstats
path: root/src/undo.c
diff options
context:
space:
mode:
authorGerd Moellmann <[email protected]>2000-08-19 12:33:00 +0000
committerGerd Moellmann <[email protected]>2000-08-19 12:33:00 +0000
commit2f33f38ac4e749b304784a26f8e63767e760fa4b (patch)
treebb55cc6134b0a3a5d0256d4d594b9385216116f2 /src/undo.c
parent136b4eda878f450163e70dd1ed56980d35d6d742 (diff)
(record_first_change, record_marker_adjustment): Don'use
XBUFFER on last_undo_buffer which might not be a buffer.
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/undo.c b/src/undo.c
index 49dc4453d1..e2e4749c6a 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);