diff options
author | Jason Rumney <jasonr@gnu.org> | 2003-01-20 20:18:13 +0000 |
---|---|---|
committer | Jason Rumney <jasonr@gnu.org> | 2003-01-20 20:18:13 +0000 |
commit | fe04b8c806d7a6203c0c102b45c1afc114082489 (patch) | |
tree | 9458421e315b048ebfd8ba505b0654ef5a3f18f0 /src/w32menu.c | |
parent | 0571f2d8cf1b263aed35832cc6c08bea452e0ce7 (diff) | |
download | emacs-fe04b8c806d7a6203c0c102b45c1afc114082489.tar.gz |
(digest_single_submenu): Declare all args.
Sync with 2002-12-23 Richard M. Stallman <rms@gnu.org>
changes in xmenu.c:
(parse_single_submenu): Use individual keymap's prompt
string as pane name, if there is one.
(set_frame_menubar): Save menu_items_n_panes from each call to
parse_single_submenu and use it when calling digest_single_submenu.
Diffstat (limited to 'src/w32menu.c')
-rw-r--r-- | src/w32menu.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/w32menu.c b/src/w32menu.c index e573986b31c..632685c337d 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -1163,7 +1163,13 @@ parse_single_submenu (item_key, item_name, maps) Qnil, Qnil, Qnil, Qnil); } else - single_keymap_panes (mapvec[i], item_name, item_key, 0, 10); + { + Lisp_Object prompt; + prompt = Fkeymap_prompt (mapvec[i]); + single_keymap_panes (mapvec[i], + !NILP (prompt) ? prompt : item_name, + item_key, 0, 10); + } } return top_level_items; @@ -1176,7 +1182,7 @@ parse_single_submenu (item_key, item_name, maps) static widget_value * digest_single_submenu (start, end, top_level_items) - int start, end; + int start, end, top_level_items; { widget_value *wv, *prev_wv, *save_wv, *first_wv; int i; @@ -1195,10 +1201,10 @@ digest_single_submenu (start, end, top_level_items) save_wv = 0; prev_wv = 0; - /* Loop over all panes and items made during this call - and construct a tree of widget_value objects. - Ignore the panes and items made by previous calls to - single_submenu, even though those are also in menu_items. */ + /* Loop over all panes and items made by the preceding call + to parse_single_submenu and construct a tree of widget_value objects. + Ignore the panes and items used by previous calls to + digest_single_submenu, even though those are also in menu_items. */ i = start; while (i < end) { @@ -1360,7 +1366,7 @@ set_frame_menubar (f, first_time, deep_p) widget_value *wv, *first_wv, *prev_wv = 0; int i, last_i; int *submenu_start, *submenu_end; - int *submenu_top_level_items; + int *submenu_top_level_items, *submenu_n_panes; /* We must not change the menubar when actually in use. */ if (f->output_data.w32->menubar_active) @@ -1427,6 +1433,7 @@ set_frame_menubar (f, first_time, deep_p) menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0; submenu_start = (int *) alloca (XVECTOR (items)->size * sizeof (int *)); submenu_end = (int *) alloca (XVECTOR (items)->size * sizeof (int *)); + submenu_n_panes = (int *) alloca (XVECTOR (items)->size * sizeof (int)); submenu_top_level_items = (int *) alloca (XVECTOR (items)->size * sizeof (int *)); init_menu_items (); @@ -1447,6 +1454,7 @@ set_frame_menubar (f, first_time, deep_p) menu_items_n_panes = 0; submenu_top_level_items[i] = parse_single_submenu (key, string, maps); + submenu_n_panes[i] = menu_items_n_panes; submenu_end[i] = menu_items_used; } @@ -1466,6 +1474,7 @@ set_frame_menubar (f, first_time, deep_p) for (i = 0; i < last_i; i += 4) { + menu_items_n_panes = submenu_n_panes[i]; wv = digest_single_submenu (submenu_start[i], submenu_end[i], submenu_top_level_items[i]); if (prev_wv) |