emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/keyboard.c


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/src/keyboard.c
Date: Sat, 03 May 2003 21:39:33 -0400

Index: emacs/src/keyboard.c
diff -c emacs/src/keyboard.c:1.736 emacs/src/keyboard.c:1.737
*** emacs/src/keyboard.c:1.736  Wed Apr 30 17:04:13 2003
--- emacs/src/keyboard.c        Sat May  3 21:39:33 2003
***************
*** 6689,6695 ****
  #ifdef SIGIO   /* for entire page */
  /* Note SIGIO has been undef'd if FIONREAD is missing.  */
  
! SIGTYPE
  input_available_signal (signo)
       int signo;
  {
--- 6689,6695 ----
  #ifdef SIGIO   /* for entire page */
  /* Note SIGIO has been undef'd if FIONREAD is missing.  */
  
! static SIGTYPE
  input_available_signal (signo)
       int signo;
  {
***************
*** 6855,6861 ****
        def = get_keymap (access_keymap (maps[mapno], Qmenu_bar, 1, 0, 1),
                          0, 1);
        if (CONSP (def))
!         menu_bar_one_keymap (def);
        }
  
    /* Move to the end those items that should be at the end.  */
--- 6855,6864 ----
        def = get_keymap (access_keymap (maps[mapno], Qmenu_bar, 1, 0, 1),
                          0, 1);
        if (CONSP (def))
!         {
!           menu_bar_one_keymap_changed_items = Qnil;
!           map_keymap (def, menu_bar_item, Qnil, NULL, 1);
!         }
        }
  
    /* Move to the end those items that should be at the end.  */
***************
*** 6909,6956 ****
    return menu_bar_items_vector;
  }
  
- /* Scan one map KEYMAP, accumulating any menu items it defines
-    in menu_bar_items_vector.  */
- 
- static Lisp_Object menu_bar_one_keymap_changed_items;
- 
- static void
- menu_bar_one_keymap (keymap)
-      Lisp_Object keymap;
- {
-   Lisp_Object tail, item;
- 
-   menu_bar_one_keymap_changed_items = Qnil;
- 
-   /* Loop over all keymap entries that have menu strings.  */
-   for (tail = keymap; CONSP (tail); tail = XCDR (tail))
-     {
-       item = XCAR (tail);
-       if (CONSP (item))
-       menu_bar_item (XCAR (item), XCDR (item));
-       else if (VECTORP (item))
-       {
-         /* Loop over the char values represented in the vector.  */
-         int len = XVECTOR (item)->size;
-         int c;
-         for (c = 0; c < len; c++)
-           {
-             Lisp_Object character;
-             XSETFASTINT (character, c);
-             menu_bar_item (character, XVECTOR (item)->contents[c]);
-           }
-       }
-     }
- }
- 
  /* Add one item to menu_bar_items_vector, for KEY, ITEM_STRING and DEF.
     If there's already an item for KEY, add this DEF to it.  */
  
  Lisp_Object item_properties;
  
  static void
! menu_bar_item (key, item)
!      Lisp_Object key, item;
  {
    struct gcpro gcpro1;
    int i;
--- 6912,6926 ----
    return menu_bar_items_vector;
  }
  
  /* Add one item to menu_bar_items_vector, for KEY, ITEM_STRING and DEF.
     If there's already an item for KEY, add this DEF to it.  */
  
  Lisp_Object item_properties;
  
  static void
! menu_bar_item (key, item, dummy1, dummy2)
!      Lisp_Object key, item, dummy1;
!      void *dummy2;
  {
    struct gcpro gcpro1;
    int i;
***************
*** 7023,7029 ****
      {
        Lisp_Object old;
        old = XVECTOR (menu_bar_items_vector)->contents[i + 2];
!       XVECTOR (menu_bar_items_vector)->contents[i + 2] = Fcons (item, old);
      }
  }
  
--- 6993,7002 ----
      {
        Lisp_Object old;
        old = XVECTOR (menu_bar_items_vector)->contents[i + 2];
!       /* If the new and the old items are not both keymaps,
!        the lookup will only find `item'.  */
!       item = Fcons (item, KEYMAPP (item) && KEYMAPP (XCAR (old)) ? old : 
Qnil);
!       XVECTOR (menu_bar_items_vector)->contents[i + 2] = item;
      }
  }
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]