]> git.eshelyaron.com Git - emacs.git/commitdiff
(set_frame_menubar): When widget is new, forget records of old contents.
authorRichard M. Stallman <rms@gnu.org>
Fri, 25 Apr 1997 00:44:48 +0000 (00:44 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 25 Apr 1997 00:44:48 +0000 (00:44 +0000)
src/xmenu.c

index a3b5d060a2277ee85c5820beb27d3685a20e59bc..7ef1131769a98c7ae24174a457f19d805818b2d8 100644 (file)
@@ -1669,6 +1669,11 @@ set_frame_menubar (f, first_time, deep_p)
        = (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