/[emacs]/emacs/src/keyboard.c
ViewVC logotype

Diff of /emacs/src/keyboard.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.663 by jhd, Sun Mar 10 16:16:38 2002 UTC revision 1.664 by kfstorm, Thu Mar 21 21:32:50 2002 UTC
# Line 6510  menu_bar_items (old) Line 6510  menu_bar_items (old)
6510        }        }
6511      else      else
6512        {        {
6513          /* No, so use major and minor mode keymaps.          /* No, so use major and minor mode keymaps and keymap property.
6514             Don't include local-map or keymap properties, as menu-bar             Note that menu-bar bindings in the local-map and keymap
6515             bindings are not supported in those maps (that would require             properties may not work reliable, as they are only
6516             checking for menu-bar updates after every command).  */             recognized when the menu-bar (or mode-line) is updated,
6517          nmaps = current_minor_maps (NULL, &tmaps);             which does not normally happen after every command.  */
6518          maps = (Lisp_Object *) alloca ((nmaps + 2) * sizeof (maps[0]));          Lisp_Object tem;
6519          bcopy (tmaps, maps, nmaps * sizeof (maps[0]));          int nminor;
6520          maps[nmaps++] = current_buffer->keymap;          nminor = current_minor_maps (NULL, &tmaps);
6521            maps = (Lisp_Object *) alloca ((nminor + 3) * sizeof (maps[0]));
6522            nmaps = 0;
6523            if (tem = get_local_map (PT, current_buffer, Qkeymap), !NILP (tem))
6524              maps[nmaps++] = tem;
6525            bcopy (tmaps, (void *) (maps + nmaps), nminor * sizeof (maps[0]));
6526            nmaps += nminor;
6527            maps[nmaps++] = get_local_map (PT, current_buffer, Qlocal_map);
6528        }        }
6529      maps[nmaps++] = current_global_map;      maps[nmaps++] = current_global_map;
6530    }    }
# Line 7158  tool_bar_items (reuse, nitems) Line 7165  tool_bar_items (reuse, nitems)
7165      }      }
7166    else    else
7167      {      {
7168        /* No, so use major and minor mode keymaps.        /* No, so use major and minor mode keymaps and keymap property.
7169           Don't include local-map or keymap properties, as tool-bar           Note that tool-bar bindings in the local-map and keymap
7170           bindings are not supported in those maps (that would require           properties may not work reliable, as they are only
7171           checking for tool-bar updates after every command).  */           recognized when the tool-bar (or mode-line) is updated,
7172        nmaps = current_minor_maps (NULL, &tmaps);           which does not normally happen after every command.  */
7173        maps = (Lisp_Object *) alloca ((nmaps + 2) * sizeof (maps[0]));        Lisp_Object tem;
7174        bcopy (tmaps, maps, nmaps * sizeof (maps[0]));        int nminor;
7175        maps[nmaps++] = current_buffer->keymap;        nminor = current_minor_maps (NULL, &tmaps);
7176          maps = (Lisp_Object *) alloca ((nminor + 3) * sizeof (maps[0]));
7177          nmaps = 0;
7178          if (tem = get_local_map (PT, current_buffer, Qkeymap), !NILP (tem))
7179            maps[nmaps++] = tem;
7180          bcopy (tmaps, (void *) (maps + nmaps), nminor * sizeof (maps[0]));
7181          nmaps += nminor;
7182          maps[nmaps++] = get_local_map (PT, current_buffer, Qlocal_map);
7183      }      }
7184    
7185    /* Add global keymap at the end.  */    /* Add global keymap at the end.  */

Legend:
Removed from v.1.663  
changed lines
  Added in v.1.664

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26