changeset 56959:dc35c2e20d41

(update_submenu_strings): YAILOM. (set_frame_menubar): Make sure last_i is initialized.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 07 Sep 2004 05:52:52 +0000
parents 9aadc2889a41
children 84482ed458f2
files src/ChangeLog src/xmenu.c
diffstat 2 files changed, 20 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Sep 07 05:32:35 2004 +0000
+++ b/src/ChangeLog	Tue Sep 07 05:52:52 2004 +0000
@@ -1,6 +1,11 @@
+2004-09-07  Stefan  <monnier@iro.umontreal.ca>
+
+	* xmenu.c (update_submenu_strings): YAILOM.
+	(set_frame_menubar): Make sure last_i is initialized.
+
 2004-09-03  Jason Rumney  <jasonr@gnu.org>
 
-	* 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  <storm@cua.dk>
 
 	* xdisp.c (set_cursor_from_row): Look for non-nil `cursor' property
@@ -22,14 +27,14 @@
 2004-09-02  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
 	* 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  <jan.h.d@swipnet.se>
 
@@ -56,7 +61,7 @@
 
 2004-08-30  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
 
-	* 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.
--- a/src/xmenu.c	Tue Sep 07 05:32:35 2004 +0000
+++ b/src/xmenu.c	Tue Sep 07 05:52:52 2004 +0000
@@ -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 @@
 
   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 @@
             }
         }
 
-      if (wv->lkey && ! NILP (wv->lkey))
+      if (STRINGP (wv->lkey))
         wv->key = SDATA (wv->lkey);
 
       if (wv->contents)
@@ -1888,7 +1888,7 @@
 #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;