aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2006-04-18 21:05:45 +0000
committerRichard M. Stallman2006-04-18 21:05:45 +0000
commit510d5bf659b7ebb9de7475c3beea22ac9c3fb965 (patch)
tree4d2880b939e9b0c1c8a59d11a63af20da79cab84 /src
parent1fc4d4635c4b08c5506ca8bbafb903d2aba20e8e (diff)
downloademacs-510d5bf659b7ebb9de7475c3beea22ac9c3fb965.tar.gz
emacs-510d5bf659b7ebb9de7475c3beea22ac9c3fb965.zip
Comment changes.
Diffstat (limited to 'src')
-rw-r--r--src/xmenu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 6de1dcb2bd1..bb8cb19cbdf 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -2180,21 +2180,27 @@ set_frame_menubar (f, first_time, deep_p)
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,