Commit 8c512fcb authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(single_keymap_panes): Put menu_item_equiv_key in the gcpro.

(menu_item_equiv_key): GCPRO things.
parent c01cadc3
......@@ -298,6 +298,7 @@ menu_item_equiv_key (item_string, item1, descrip_ptr)
Lisp_Object savedkey, descrip;
Lisp_Object def1;
int changed = 0;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
/* If a help string follows the item string, skip it. */
if (CONSP (XCONS (item1)->cdr)
......@@ -318,6 +319,8 @@ menu_item_equiv_key (item_string, item1, descrip_ptr)
descrip = XCONS (cachelist)->cdr;
}
GCPRO4 (def, def1, savedkey, descrip);
/* Is it still valid? */
def1 = Qnil;
if (!NILP (savedkey))
......@@ -363,6 +366,7 @@ menu_item_equiv_key (item_string, item1, descrip_ptr)
XCONS (cachelist)->cdr = descrip;
}
UNGCPRO;
*descrip_ptr = descrip;
return def;
}
......@@ -469,14 +473,16 @@ single_keymap_panes (keymap, pane_name, prefix, notreal)
Lisp_Object descrip;
Lisp_Object tem, enabled;
def = menu_item_equiv_key (item_string, item1, &descrip);
/* GCPRO because we will call eval.
/* GCPRO because ...enabled_p will call eval
and ..._equiv_key may autoload something.
Protecting KEYMAP preserves everything we use;
aside from that, must protect whatever might be
a string. Since there's no GCPRO5, we refetch
item_string instead of protecting it. */
descrip = def = Qnil;
GCPRO4 (keymap, pending_maps, def, descrip);
def = menu_item_equiv_key (item_string, item1, &descrip);
enabled = menu_item_enabled_p (def, notreal);
UNGCPRO;
......@@ -537,15 +543,18 @@ single_keymap_panes (keymap, pane_name, prefix, notreal)
Lisp_Object descrip;
Lisp_Object tem, enabled;
def = menu_item_equiv_key (item_string, item1, &descrip);
/* GCPRO because we will call eval.
/* GCPRO because ...enabled_p will call eval
and ..._equiv_key may autoload something.
Protecting KEYMAP preserves everything we use;
aside from that, must protect whatever might be
a string. Since there's no GCPRO5, we refetch
item_string instead of protecting it. */
GCPRO4 (keymap, pending_maps, def, descrip);
descrip = def = Qnil;
def = menu_item_equiv_key (item_string, item1, &descrip);
enabled = menu_item_enabled_p (def, notreal);
UNGCPRO;
item_string = XCONS (item1)->car;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment