changeset 64173:9e2bb087ae33

(menu_bar_items): Don't GCPRO menu_bar_items_vector here. (syms_of_keyboard): Initialize and staticpro menu_bar_items_vector.
author Kim F. Storm <storm@cua.dk>
date Fri, 08 Jul 2005 14:48:03 +0000
parents 9635c054d17a
children e67e083f596d
files src/keyboard.c
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Fri Jul 08 14:47:41 2005 +0000
+++ b/src/keyboard.c	Fri Jul 08 14:48:03 2005 +0000
@@ -6917,8 +6917,6 @@
 
   int i;
 
-  struct gcpro gcpro1;
-
   /* In order to build the menus, we need to call the keymap
      accessors.  They all call QUIT.  But this function is called
      during redisplay, during which a quit is fatal.  So inhibit
@@ -6934,8 +6932,6 @@
     menu_bar_items_vector = Fmake_vector (make_number (24), Qnil);
   menu_bar_items_index = 0;
 
-  GCPRO1 (menu_bar_items_vector);
-
   /* Build our list of keymaps.
      If we recognize a function key and replace its escape sequence in
      keybuf with its symbol, or if the sequence starts with a mouse
@@ -7039,7 +7035,6 @@
   menu_bar_items_index = i;
 
   Vinhibit_quit = oquit;
-  UNGCPRO;
   return menu_bar_items_vector;
 }
 
@@ -11011,6 +11006,9 @@
   menu_bar_one_keymap_changed_items = Qnil;
   staticpro (&menu_bar_one_keymap_changed_items);
 
+  menu_bar_items_vector = Qnil;
+  staticpro (&menu_bar_items_vector);
+
   defsubr (&Sevent_convert_list);
   defsubr (&Sread_key_sequence);
   defsubr (&Sread_key_sequence_vector);