aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2002-03-21 21:33:31 +0000
committerKim F. Storm2002-03-21 21:33:31 +0000
commitfd6463412b9e4cd83483c148b5fee9a3c7906de9 (patch)
treee676201d2d6872763ff762f6cfc91cc56777056a /src
parentbf76fe9c57b03f657dd84f17dc8a541e787b74e3 (diff)
downloademacs-fd6463412b9e4cd83483c148b5fee9a3c7906de9.tar.gz
emacs-fd6463412b9e4cd83483c148b5fee9a3c7906de9.zip
(menu_bar_items): Mostly undo 2002-02-20 patch, so
menu-bar bindings in keymap and local-map properties _are_ used. But try keymap property first in accordance with 2002-01-03 patch. Added comment describing why this is not always reliable. (tool_bar_items): Ditto for tool-bar.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/keyboard.c46
2 files changed, 38 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 56d5076d021..868fc5a14f7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12002-03-21 Kim F. Storm <storm@cua.dk>
2
3 * keyboard.c (menu_bar_items): Mostly undo 2002-02-20 patch, so
4 menu-bar bindings in keymap and local-map properties _are_ used.
5 But try keymap property first in accordance with 2002-01-03 patch.
6 Added comment describing why this is not always reliable.
7 (tool_bar_items): Ditto for tool-bar.
8
12002-03-21 Jason Rumney <jasonr@gnu.org> 92002-03-21 Jason Rumney <jasonr@gnu.org>
2 10
3 * w32fns.c (x_clear_image_1): Disable color table code. 11 * w32fns.c (x_clear_image_1): Disable color table code.
diff --git a/src/keyboard.c b/src/keyboard.c
index d04580b7c5a..7862796f8fb 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -6510,14 +6510,21 @@ menu_bar_items (old)
6510 } 6510 }
6511 else 6511 else
6512 { 6512 {
6513 /* No, so use major and minor mode keymaps. 6513 /* No, so use major and minor mode keymaps and keymap property.
6514 Don't include local-map or keymap properties, as menu-bar 6514 Note that menu-bar bindings in the local-map and keymap
6515 bindings are not supported in those maps (that would require 6515 properties may not work reliable, as they are only
6516 checking for menu-bar updates after every command). */ 6516 recognized when the menu-bar (or mode-line) is updated,
6517 nmaps = current_minor_maps (NULL, &tmaps); 6517 which does not normally happen after every command. */
6518 maps = (Lisp_Object *) alloca ((nmaps + 2) * sizeof (maps[0])); 6518 Lisp_Object tem;
6519 bcopy (tmaps, maps, nmaps * sizeof (maps[0])); 6519 int nminor;
6520 maps[nmaps++] = current_buffer->keymap; 6520 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);
6521 } 6528 }
6522 maps[nmaps++] = current_global_map; 6529 maps[nmaps++] = current_global_map;
6523 } 6530 }
@@ -7158,14 +7165,21 @@ tool_bar_items (reuse, nitems)
7158 } 7165 }
7159 else 7166 else
7160 { 7167 {
7161 /* No, so use major and minor mode keymaps. 7168 /* No, so use major and minor mode keymaps and keymap property.
7162 Don't include local-map or keymap properties, as tool-bar 7169 Note that tool-bar bindings in the local-map and keymap
7163 bindings are not supported in those maps (that would require 7170 properties may not work reliable, as they are only
7164 checking for tool-bar updates after every command). */ 7171 recognized when the tool-bar (or mode-line) is updated,
7165 nmaps = current_minor_maps (NULL, &tmaps); 7172 which does not normally happen after every command. */
7166 maps = (Lisp_Object *) alloca ((nmaps + 2) * sizeof (maps[0])); 7173 Lisp_Object tem;
7167 bcopy (tmaps, maps, nmaps * sizeof (maps[0])); 7174 int nminor;
7168 maps[nmaps++] = current_buffer->keymap; 7175 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);
7169 } 7183 }
7170 7184
7171 /* Add global keymap at the end. */ 7185 /* Add global keymap at the end. */