# HG changeset patch # User Richard M. Stallman # Date 772225932 0 # Node ID dda8e966edf52947ff140e4ef96419347f9a3c3a # Parent bf04e77f34dc5c8997889c195cde3e3bafcb6c62 (single_keymap_panes): Put menu_item_equiv_key in the gcpro. (menu_item_equiv_key): GCPRO things. diff -r bf04e77f34dc -r dda8e966edf5 src/xmenu.c --- a/src/xmenu.c Tue Jun 21 19:10:54 1994 +0000 +++ b/src/xmenu.c Tue Jun 21 19:12:12 1994 +0000 @@ -298,6 +298,7 @@ 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 @@ descrip = XCONS (cachelist)->cdr; } + GCPRO4 (def, def1, savedkey, descrip); + /* Is it still valid? */ def1 = Qnil; if (!NILP (savedkey)) @@ -363,6 +366,7 @@ XCONS (cachelist)->cdr = descrip; } + UNGCPRO; *descrip_ptr = descrip; return def; } @@ -469,14 +473,16 @@ 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 @@ 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;