From d5b3eb1b54e6c753077306b0a864f3459992f44b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 13 Dec 2000 14:13:18 +0000 Subject: [PATCH] (get_keyelt): Only eval the filter if `autoload' is set. --- src/ChangeLog | 10 ++++++++-- src/keymap.c | 8 ++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 861de1036c..7dc51cd46f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,13 @@ +2000-12-13 Stefan Monnier + + * keymap.c (get_keyelt): Only eval the filter if `autoload' is set. + + * keyboard.c (menu_bar_items, tool_bar_items): + Set `autoload' when looking up `tool-bar' or `menu-bar' submap. + 2000-12-13 Gerd Moellmann - * xterm.c (x_term_init): Declare gray_bitmap_bits as `extern - char *' + * xterm.c (x_term_init): Declare gray_bitmap_bits as `extern char *'. * xfns.c (gray_bitmap_bits): Declare `char *'. diff --git a/src/keymap.c b/src/keymap.c index 68c673380c..52b535e5d1 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -615,18 +615,14 @@ get_keyelt (object, autoload) /* If there's a `:filter FILTER', apply FILTER to the menu-item's definition to get the real definition to - use. Temporarily inhibit GC while evaluating FILTER, - because not functions calling get_keyelt are prepared - for a GC. */ + use. */ for (; CONSP (tem) && CONSP (XCDR (tem)); tem = XCDR (tem)) - if (EQ (XCAR (tem), QCfilter)) + if (EQ (XCAR (tem), QCfilter) && autoload) { - int count = inhibit_garbage_collection (); Lisp_Object filter; filter = XCAR (XCDR (tem)); filter = list2 (filter, list2 (Qquote, object)); object = menu_item_eval_property (filter); - unbind_to (count, Qnil); break; } } -- 2.20.1