aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-07-04 12:08:25 +0000
committerGerd Moellmann2000-07-04 12:08:25 +0000
commit5365473301185cda5276645287697da3f807d705 (patch)
treeeb1e072df433debe2e2e6b8cefcf07c2fd3ba4b6 /src
parentfca68a958a6ec9b002cd801ae37a1f8de0372df9 (diff)
downloademacs-5365473301185cda5276645287697da3f807d705.tar.gz
emacs-5365473301185cda5276645287697da3f807d705.zip
(get_keyelt): Temporarily inhibit GC while evaluating
a menu filter.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/keymap.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 82730f06721..f3f521aa47c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12000-07-04 Gerd Moellmann <gerd@gnu.org>
2
3 * keymap.c (get_keyelt): Temporarily inhibit GC while evaluating
4 a menu filter.
5
12000-07-04 Kenichi Handa <handa@etl.go.jp> 62000-07-04 Kenichi Handa <handa@etl.go.jp>
2 7
3 * composite.h (make_composition_value_copy): Extern it. 8 * 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)
592 592
593 /* If there's a `:filter FILTER', apply FILTER to the 593 /* If there's a `:filter FILTER', apply FILTER to the
594 menu-item's definition to get the real definition to 594 menu-item's definition to get the real definition to
595 use. */ 595 use. Temporarily inhibit GC while evaluating FILTER,
596 because not functions calling get_keyelt are prepared
597 for a GC. */
596 for (; CONSP (tem) && CONSP (XCDR (tem)); tem = XCDR (tem)) 598 for (; CONSP (tem) && CONSP (XCDR (tem)); tem = XCDR (tem))
597 if (EQ (XCAR (tem), QCfilter)) 599 if (EQ (XCAR (tem), QCfilter))
598 { 600 {
601 int count = inhibit_garbage_collection ();
599 Lisp_Object filter; 602 Lisp_Object filter;
600 filter = XCAR (XCDR (tem)); 603 filter = XCAR (XCDR (tem));
601 filter = list2 (filter, list2 (Qquote, object)); 604 filter = list2 (filter, list2 (Qquote, object));
602 object = menu_item_eval_property (filter); 605 object = menu_item_eval_property (filter);
606 unbind_to (count, Qnil);
603 break; 607 break;
604 } 608 }
605 } 609 }