aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2012-11-21 11:34:35 -0500
committerStefan Monnier2012-11-21 11:34:35 -0500
commit954bba56c62e4e0637a933cf21626a55b873e144 (patch)
tree194489fb3ea2ea07523abb9898f44f413c16aab8 /src
parent3dc00ee808ba8e8eea214d541025c2dc27e74831 (diff)
downloademacs-954bba56c62e4e0637a933cf21626a55b873e144.tar.gz
emacs-954bba56c62e4e0637a933cf21626a55b873e144.zip
* src/xdisp.c (fast_set_selected_frame): Rename from update_tool_bar_unwind.
Make it set selected_window as well. (update_tool_bar): Use it.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xdisp.c21
2 files changed, 22 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c16a4dc87ce..b1a76bfdae0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12012-11-21 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * xdisp.c (fast_set_selected_frame): Rename from update_tool_bar_unwind.
4 Make it set selected_window as well.
5 (update_tool_bar): Use it.
6
12012-11-21 Ken Brown <kbrown@cornell.edu> 72012-11-21 Ken Brown <kbrown@cornell.edu>
2 8
3 * emacs.c (main): Set the G_SLICE environment variable for all 9 * emacs.c (main): Set the G_SLICE environment variable for all
diff --git a/src/xdisp.c b/src/xdisp.c
index 4d359593c75..f0da28fcedd 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -11484,11 +11484,18 @@ FRAME_PTR last_mouse_frame;
11484 11484
11485int last_tool_bar_item; 11485int last_tool_bar_item;
11486 11486
11487 11487/* Select `frame' temporarily without running all the code in
11488 do_switch_frame.
11489 FIXME: Maybe do_switch_frame should be trimmed down similarly
11490 when `norecord' is set. */
11488static Lisp_Object 11491static Lisp_Object
11489update_tool_bar_unwind (Lisp_Object frame) 11492fast_set_selected_frame (Lisp_Object frame)
11490{ 11493{
11491 selected_frame = frame; 11494 if (!EQ (selected_frame, frame))
11495 {
11496 selected_frame = frame;
11497 selected_window = XFRAME (frame)->selected_window;
11498 }
11492 return Qnil; 11499 return Qnil;
11493} 11500}
11494 11501
@@ -11560,9 +11567,13 @@ update_tool_bar (struct frame *f, int save_match_data)
11560 before calling tool_bar_items, because the calculation of 11567 before calling tool_bar_items, because the calculation of
11561 the tool-bar keymap uses the selected frame (see 11568 the tool-bar keymap uses the selected frame (see
11562 `tool-bar-make-keymap' in tool-bar.el). */ 11569 `tool-bar-make-keymap' in tool-bar.el). */
11563 record_unwind_protect (update_tool_bar_unwind, selected_frame); 11570 eassert (EQ (selected_window,
11571 /* Since we only explicitly preserve selected_frame,
11572 check that selected_window would be redundant. */
11573 XFRAME (selected_frame)->selected_window));
11574 record_unwind_protect (fast_set_selected_frame, selected_frame);
11564 XSETFRAME (frame, f); 11575 XSETFRAME (frame, f);
11565 selected_frame = frame; 11576 fast_set_selected_frame (frame);
11566 11577
11567 /* Build desired tool-bar items from keymaps. */ 11578 /* Build desired tool-bar items from keymaps. */
11568 new_tool_bar 11579 new_tool_bar