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 |
} |
} |
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. */ |