From ae0b9b4690a0bcff233659d3892797b1743a99fd Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 27 Oct 2000 23:01:20 +0000 Subject: [PATCH] * undo.c (record_delete): Check that last_undo_buffer is really a buffer before applying XBUFFER to it. * keymap.c (where_is_internal): Pass lisp object, not integer, to Faref. --- src/ChangeLog | 6 ++++++ src/keymap.c | 2 +- src/undo.c | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index eb0356db4e6..eb4f2052aec 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,12 @@ * window.h (Fwindow_live_p): Declare. + * undo.c (record_delete): Check that last_undo_buffer is really a + buffer before applying XBUFFER to it. + + * keymap.c (where_is_internal): Pass lisp object, not integer, to + Faref. + 2000-10-27 Stefan Monnier * lisp.h (KEYMAPP): New macro. diff --git a/src/keymap.c b/src/keymap.c index ccb39da186f..c24bb66b625 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -2108,7 +2108,7 @@ where_is_internal (definition, keymaps, firstonly, noindirect) if (nomenus && XINT (last) >= 0) { /* If no menu entries should be returned, skip over the keymaps bound to `menu-bar' and `tool-bar'. */ - Lisp_Object tem = Faref (this, 0); + Lisp_Object tem = Faref (this, make_number (0)); if (EQ (tem, Qmenu_bar) || EQ (tem, Qtool_bar)) continue; } diff --git a/src/undo.c b/src/undo.c index e2e4749c6a3..2eedfe31ab3 100644 --- a/src/undo.c +++ b/src/undo.c @@ -102,7 +102,8 @@ record_delete (beg, string) 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); -- 2.39.5