From: Gerd Moellmann Date: Tue, 4 Jul 2000 12:08:25 +0000 (+0000) Subject: (get_keyelt): Temporarily inhibit GC while evaluating X-Git-Tag: emacs-pretest-21.0.90~2992 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5365473301185cda5276645287697da3f807d705;p=emacs.git (get_keyelt): Temporarily inhibit GC while evaluating a menu filter. --- diff --git a/src/ChangeLog b/src/ChangeLog index 82730f06721..f3f521aa47c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2000-07-04 Gerd Moellmann + + * keymap.c (get_keyelt): Temporarily inhibit GC while evaluating + a menu filter. + 2000-07-04 Kenichi Handa * composite.h (make_composition_value_copy): Extern it. diff --git a/src/keymap.c b/src/keymap.c index 11d8ab860a5..414de7b14a3 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -592,14 +592,18 @@ 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. */ + use. Temporarily inhibit GC while evaluating FILTER, + because not functions calling get_keyelt are prepared + for a GC. */ for (; CONSP (tem) && CONSP (XCDR (tem)); tem = XCDR (tem)) if (EQ (XCAR (tem), QCfilter)) { + 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; } }