aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-06-21 19:12:12 +0000
committerRichard M. Stallman1994-06-21 19:12:12 +0000
commit8c512fcb00bacdf3a698db9a388ea9e0abd96eae (patch)
tree7607c2a85bfdf893af0f670e38579e33e7050ebf /src
parentc01cadc3e910d55e9ee3b643a8141a5b309401c1 (diff)
downloademacs-8c512fcb00bacdf3a698db9a388ea9e0abd96eae.tar.gz
emacs-8c512fcb00bacdf3a698db9a388ea9e0abd96eae.zip
(single_keymap_panes): Put menu_item_equiv_key in the gcpro.
(menu_item_equiv_key): GCPRO things.
Diffstat (limited to 'src')
-rw-r--r--src/xmenu.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index ca740d2ca13..4e8f424b84e 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -298,6 +298,7 @@ menu_item_equiv_key (item_string, item1, descrip_ptr)
298 Lisp_Object savedkey, descrip; 298 Lisp_Object savedkey, descrip;
299 Lisp_Object def1; 299 Lisp_Object def1;
300 int changed = 0; 300 int changed = 0;
301 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
301 302
302 /* If a help string follows the item string, skip it. */ 303 /* If a help string follows the item string, skip it. */
303 if (CONSP (XCONS (item1)->cdr) 304 if (CONSP (XCONS (item1)->cdr)
@@ -318,6 +319,8 @@ menu_item_equiv_key (item_string, item1, descrip_ptr)
318 descrip = XCONS (cachelist)->cdr; 319 descrip = XCONS (cachelist)->cdr;
319 } 320 }
320 321
322 GCPRO4 (def, def1, savedkey, descrip);
323
321 /* Is it still valid? */ 324 /* Is it still valid? */
322 def1 = Qnil; 325 def1 = Qnil;
323 if (!NILP (savedkey)) 326 if (!NILP (savedkey))
@@ -363,6 +366,7 @@ menu_item_equiv_key (item_string, item1, descrip_ptr)
363 XCONS (cachelist)->cdr = descrip; 366 XCONS (cachelist)->cdr = descrip;
364 } 367 }
365 368
369 UNGCPRO;
366 *descrip_ptr = descrip; 370 *descrip_ptr = descrip;
367 return def; 371 return def;
368} 372}
@@ -469,14 +473,16 @@ single_keymap_panes (keymap, pane_name, prefix, notreal)
469 Lisp_Object descrip; 473 Lisp_Object descrip;
470 Lisp_Object tem, enabled; 474 Lisp_Object tem, enabled;
471 475
472 def = menu_item_equiv_key (item_string, item1, &descrip); 476 /* GCPRO because ...enabled_p will call eval
473 477 and ..._equiv_key may autoload something.
474 /* GCPRO because we will call eval.
475 Protecting KEYMAP preserves everything we use; 478 Protecting KEYMAP preserves everything we use;
476 aside from that, must protect whatever might be 479 aside from that, must protect whatever might be
477 a string. Since there's no GCPRO5, we refetch 480 a string. Since there's no GCPRO5, we refetch
478 item_string instead of protecting it. */ 481 item_string instead of protecting it. */
482 descrip = def = Qnil;
479 GCPRO4 (keymap, pending_maps, def, descrip); 483 GCPRO4 (keymap, pending_maps, def, descrip);
484
485 def = menu_item_equiv_key (item_string, item1, &descrip);
480 enabled = menu_item_enabled_p (def, notreal); 486 enabled = menu_item_enabled_p (def, notreal);
481 487
482 UNGCPRO; 488 UNGCPRO;
@@ -537,15 +543,18 @@ single_keymap_panes (keymap, pane_name, prefix, notreal)
537 Lisp_Object descrip; 543 Lisp_Object descrip;
538 Lisp_Object tem, enabled; 544 Lisp_Object tem, enabled;
539 545
540 def = menu_item_equiv_key (item_string, item1, &descrip); 546 /* GCPRO because ...enabled_p will call eval
541 547 and ..._equiv_key may autoload something.
542 /* GCPRO because we will call eval.
543 Protecting KEYMAP preserves everything we use; 548 Protecting KEYMAP preserves everything we use;
544 aside from that, must protect whatever might be 549 aside from that, must protect whatever might be
545 a string. Since there's no GCPRO5, we refetch 550 a string. Since there's no GCPRO5, we refetch
546 item_string instead of protecting it. */ 551 item_string instead of protecting it. */
547 GCPRO4 (keymap, pending_maps, def, descrip); 552 GCPRO4 (keymap, pending_maps, def, descrip);
553 descrip = def = Qnil;
554
555 def = menu_item_equiv_key (item_string, item1, &descrip);
548 enabled = menu_item_enabled_p (def, notreal); 556 enabled = menu_item_enabled_p (def, notreal);
557
549 UNGCPRO; 558 UNGCPRO;
550 559
551 item_string = XCONS (item1)->car; 560 item_string = XCONS (item1)->car;