comparison src/xmenu.c @ 70086:c12e24e779ab

Comment changes.
author Richard M. Stallman <rms@gnu.org>
date Tue, 18 Apr 2006 21:05:45 +0000
parents 93e99c27012e
children cd5b1fdef8d6 2d2f6f096f6e 72dea2ff0142
comparison
equal deleted inserted replaced
70085:93e99c27012e 70086:c12e24e779ab
2178 set_buffer_internal_1 (prev); 2178 set_buffer_internal_1 (prev);
2179 2179
2180 /* If there has been no change in the Lisp-level contents 2180 /* If there has been no change in the Lisp-level contents
2181 of the menu bar, skip redisplaying it. Just exit. */ 2181 of the menu bar, skip redisplaying it. Just exit. */
2182 2182
2183 /* Compare the new menu items with the ones computed last time. */
2183 for (i = 0; i < previous_menu_items_used; i++) 2184 for (i = 0; i < previous_menu_items_used; i++)
2184 if (menu_items_used == i 2185 if (menu_items_used == i
2185 || (!EQ (previous_items[i], XVECTOR (menu_items)->contents[i]))) 2186 || (!EQ (previous_items[i], XVECTOR (menu_items)->contents[i])))
2186 break; 2187 break;
2187 if (i == menu_items_used && i == previous_menu_items_used && i != 0) 2188 if (i == menu_items_used && i == previous_menu_items_used && i != 0)
2188 { 2189 {
2190 /* The menu items have not changed. Don't bother updating
2191 the menus in any form, since it would be a no-op. */
2189 free_menubar_widget_value_tree (first_wv); 2192 free_menubar_widget_value_tree (first_wv);
2190 discard_menu_items (); 2193 discard_menu_items ();
2191 unbind_to (specpdl_count, Qnil); 2194 unbind_to (specpdl_count, Qnil);
2192 return; 2195 return;
2193 } 2196 }
2194 2197
2198 /* The menu items are different, so store them in the frame. */
2195 f->menu_bar_vector = menu_items; 2199 f->menu_bar_vector = menu_items;
2196 f->menu_bar_items_used = menu_items_used; 2200 f->menu_bar_items_used = menu_items_used;
2197 2201
2202 /* This calls restore_menu_items to restore menu_items, etc.,
2203 as they were outside. */
2198 unbind_to (specpdl_count, Qnil); 2204 unbind_to (specpdl_count, Qnil);
2199 2205
2200 /* Now GC cannot happen during the lifetime of the widget_value, 2206 /* Now GC cannot happen during the lifetime of the widget_value,
2201 so it's safe to store data from a Lisp_String. */ 2207 so it's safe to store data from a Lisp_String. */
2202 wv = first_wv->contents; 2208 wv = first_wv->contents;