changeset 17554:0a75fcee3cb8

(set_frame_menubar): When widget is new, forget records of old contents.
author Richard M. Stallman <rms@gnu.org>
date Fri, 25 Apr 1997 00:44:48 +0000
parents 1dc9754cbf8e
children 6e2928cff18e
files src/xmenu.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/xmenu.c	Thu Apr 24 22:54:27 1997 +0000
+++ b/src/xmenu.c	Fri Apr 25 00:44:48 1997 +0000
@@ -1669,6 +1669,11 @@
 	= (Lisp_Object *) alloca (previous_menu_items_used
 				  * sizeof (Lisp_Object));
 
+      /* If we are making a new widget, its contents are empty,
+	 do always reinitialize them.  */
+      if (! menubar_widget)
+	previous_menu_items_used = 0;
+
       buffer = XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer;
       specbind (Qinhibit_quit, Qt);
       /* Don't let the debugger step into this code