From 1806714ad86e47cc6692207a3bcd3223b8df5972 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 7 Sep 2004 05:52:52 +0000 Subject: [PATCH] (update_submenu_strings): YAILOM. (set_frame_menubar): Make sure last_i is initialized. --- src/ChangeLog | 27 ++++++++++++++++----------- src/xmenu.c | 8 ++++---- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8fd72a29c29..ac72b86018a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,11 @@ +2004-09-07 Stefan + + * xmenu.c (update_submenu_strings): YAILOM. + (set_frame_menubar): Make sure last_i is initialized. + 2004-09-03 Jason Rumney - * w32menu.c (_widget_value): Added lname and lkey. + * w32menu.c (_widget_value): Add lname and lkey. (digest_single_submenu): Set lname and lkey in widget_value instead of name and key. (update_submenu_strings): New function. @@ -12,7 +17,7 @@ UTF-8 if Unicode API is available. (utf8to16): New function. (add_menu_item): Use it when calling Unicode API. - + 2004-09-03 Kim F. Storm * xdisp.c (set_cursor_from_row): Look for non-nil `cursor' property @@ -22,14 +27,14 @@ 2004-09-02 YAMAMOTO Mitsuharu * macfns.c (x_real_positions): Save the current window port and - set a new one before obtaining the global coordinate. Use - FRAME_MAC_WINDOW. - (x_set_name, x_set_title): Encode title to UTF8. Use - SetWindowTitleWithCFString. + set a new one before obtaining the global coordinate. + Use FRAME_MAC_WINDOW. + (x_set_name, x_set_title): Encode title to UTF8. + Use SetWindowTitleWithCFString. (Fx_server_version): Get correct OS version. - * macmenu.c (add_menu_item): Remove unused variable `i'. Don't - let separator items destroy refence constants of other menu items. + * macmenu.c (add_menu_item): Remove unused variable `i'. + Don't let separator items destroy refence constants of other menu items. * macterm.c (x_update_end): Move SetPortWindowPort to inside BLOCK_INPUT. @@ -40,8 +45,8 @@ * s/darwin.h (LIBS_CARBON): New define to specify libraries for Carbon support. - (LD_SWITCH_SYSTEM_TEMACS): Don't link with unused libstdc++. Use - LIBS_CARBON. + (LD_SWITCH_SYSTEM_TEMACS): Don't link with unused libstdc++. + Use LIBS_CARBON. 2004-09-02 Jan Dj,Ad(Brv @@ -56,7 +61,7 @@ 2004-08-30 Jan Dj,Ad(Brv - * macmenu.c (_widget_value): Added lname and lkey. + * macmenu.c (_widget_value): Add lname and lkey. (single_submenu): Set lname and lkey in widget_value instead of name and key. (update_submenu_strings): New function. diff --git a/src/xmenu.c b/src/xmenu.c index 7f6e7c398a9..b722b245af9 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1,5 +1,5 @@ /* X Communication module for terminals which understand the X protocol. - Copyright (C) 1986, 88, 93, 94, 96, 99, 2000, 2001, 2003 + Copyright (C) 1986, 1988, 1993, 1994, 1996, 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -1801,7 +1801,7 @@ update_submenu_strings (first_wv) for (wv = first_wv; wv; wv = wv->next) { - if (wv->lname && ! NILP (wv->lname)) + if (STRINGP (wv->lname)) { wv->name = SDATA (wv->lname); @@ -1815,7 +1815,7 @@ update_submenu_strings (first_wv) } } - if (wv->lkey && ! NILP (wv->lkey)) + if (STRINGP (wv->lkey)) wv->key = SDATA (wv->lkey); if (wv->contents) @@ -1888,7 +1888,7 @@ set_frame_menubar (f, first_time, deep_p) #endif Lisp_Object items; widget_value *wv, *first_wv, *prev_wv = 0; - int i, last_i; + int i, last_i = 0; int *submenu_start, *submenu_end; int *submenu_top_level_items, *submenu_n_panes; -- 2.39.2