]> git.eshelyaron.com Git - emacs.git/commitdiff
(record_first_change, record_marker_adjustment): Don'use
authorGerd Moellmann <gerd@gnu.org>
Sat, 19 Aug 2000 12:33:00 +0000 (12:33 +0000)
committerGerd Moellmann <gerd@gnu.org>
Sat, 19 Aug 2000 12:33:00 +0000 (12:33 +0000)
XBUFFER on last_undo_buffer which might not be a buffer.

src/undo.c

index 49dc4453d119f06f9f5fa8785ed019464c2087b8..e2e4749c6a36cf70ddadf56ab50e969e4492ce97 100644 (file)
@@ -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);