aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorPaul Eggert2012-08-17 14:52:15 -0700
committerPaul Eggert2012-08-17 14:52:15 -0700
commitf00af5b1c24515f20f96cfd8d59983ab62fb3f25 (patch)
treefbb0f748b8de748ee3e722c9cc3647caea32fe1c /src/window.c
parent0c94c8d603031f6b665ae7f3136ca77fb573fd7e (diff)
downloademacs-f00af5b1c24515f20f96cfd8d59983ab62fb3f25.tar.gz
emacs-f00af5b1c24515f20f96cfd8d59983ab62fb3f25.zip
* frame.h (FSET): Remove (Bug#12215).
Replace all uses with calls to new setter functions. Use INLINE_HEADER_BEGIN, INLINE_HEADER_END. (FRAME_INLINE): New macro. (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars) (fset_current_tool_bar_string, fset_desired_tool_bar_string) (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items) (fset_menu_bar_vector, fset_menu_bar_window, fset_name) (fset_param_alist, fset_root_window, fset_scroll_bars) (fset_selected_window, fset_title, fset_tool_bar_items) (fset_tool_bar_position, fset_tool_bar_window): New functions. * frame.c (FRAME_INLINE): Define to EXTERN_INLINE, so that the corresponding functions are compiled into code. (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/window.c b/src/window.c
index 7874105df1e..140b925ed6d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -322,7 +322,10 @@ Return WINDOW. */)
322 if (EQ (frame, selected_frame)) 322 if (EQ (frame, selected_frame))
323 return Fselect_window (window, norecord); 323 return Fselect_window (window, norecord);
324 else 324 else
325 return FSET (XFRAME (frame), selected_window, window); 325 {
326 fset_selected_window (XFRAME (frame), window);
327 return window;
328 }
326} 329}
327 330
328DEFUN ("selected-window", Fselected_window, Sselected_window, 0, 0, 0, 331DEFUN ("selected-window", Fselected_window, Sselected_window, 0, 0, 0,
@@ -365,7 +368,7 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap)
365 sf = SELECTED_FRAME (); 368 sf = SELECTED_FRAME ();
366 if (XFRAME (WINDOW_FRAME (w)) != sf) 369 if (XFRAME (WINDOW_FRAME (w)) != sf)
367 { 370 {
368 FSET (XFRAME (WINDOW_FRAME (w)), selected_window, window); 371 fset_selected_window (XFRAME (WINDOW_FRAME (w)), window);
369 /* Use this rather than Fhandle_switch_frame 372 /* Use this rather than Fhandle_switch_frame
370 so that FRAME_FOCUS_FRAME is moved appropriately as we 373 so that FRAME_FOCUS_FRAME is moved appropriately as we
371 move around in the state where a minibuffer in a separate 374 move around in the state where a minibuffer in a separate
@@ -376,7 +379,7 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap)
376 return window; 379 return window;
377 } 380 }
378 else 381 else
379 FSET (sf, selected_window, window); 382 fset_selected_window (sf, window);
380 383
381 /* Store the current buffer's actual point into the 384 /* Store the current buffer's actual point into the
382 old selected window. It belongs to that window, 385 old selected window. It belongs to that window,
@@ -1863,7 +1866,7 @@ replace_window (Lisp_Object old, Lisp_Object new, int setflag)
1863 /* If OLD is its frame's root window, then NEW is the new 1866 /* If OLD is its frame's root window, then NEW is the new
1864 root window for that frame. */ 1867 root window for that frame. */
1865 if (EQ (old, FRAME_ROOT_WINDOW (XFRAME (o->frame)))) 1868 if (EQ (old, FRAME_ROOT_WINDOW (XFRAME (o->frame))))
1866 FSET (XFRAME (o->frame), root_window, new); 1869 fset_root_window (XFRAME (o->frame), new);
1867 1870
1868 if (setflag) 1871 if (setflag)
1869 { 1872 {
@@ -2146,7 +2149,7 @@ decode_next_window_args (Lisp_Object *window, Lisp_Object *minibuf, Lisp_Object
2146 2149
2147 /* ALL_FRAMES nil doesn't specify which frames to include. */ 2150 /* ALL_FRAMES nil doesn't specify which frames to include. */
2148 if (NILP (*all_frames)) 2151 if (NILP (*all_frames))
2149 *all_frames 2152 *all_frames
2150 = (!EQ (*minibuf, Qlambda) 2153 = (!EQ (*minibuf, Qlambda)
2151 ? FRAME_MINIBUF_WINDOW (XFRAME (XWINDOW (*window)->frame)) 2154 ? FRAME_MINIBUF_WINDOW (XFRAME (XWINDOW (*window)->frame))
2152 : Qnil); 2155 : Qnil);
@@ -2659,7 +2662,7 @@ window-start value is reasonable when this function is called. */)
2659 if (EQ (selected_frame, w->frame)) 2662 if (EQ (selected_frame, w->frame))
2660 Fselect_window (window, Qnil); 2663 Fselect_window (window, Qnil);
2661 else 2664 else
2662 FSET (f, selected_window, window); 2665 fset_selected_window (f, window);
2663 } 2666 }
2664 } 2667 }
2665 else 2668 else
@@ -2689,7 +2692,7 @@ window-start value is reasonable when this function is called. */)
2689 if (EQ (selected_frame, w->frame)) 2692 if (EQ (selected_frame, w->frame))
2690 Fselect_window (swindow, Qnil); 2693 Fselect_window (swindow, Qnil);
2691 else 2694 else
2692 FSET (f, selected_window, swindow); 2695 fset_selected_window (f, swindow);
2693 } 2696 }
2694 } 2697 }
2695 2698
@@ -2741,8 +2744,8 @@ window-start value is reasonable when this function is called. */)
2741 if (!resize_failed) 2744 if (!resize_failed)
2742 { 2745 {
2743 WSET (w, left_col, r->left_col); 2746 WSET (w, left_col, r->left_col);
2744 XSETINT (delta, XINT (r->total_cols) 2747 XSETINT (delta,
2745 - XINT (w->total_cols)); 2748 XINT (r->total_cols) - XINT (w->total_cols));
2746 WSET (w, left_col, r->left_col); 2749 WSET (w, left_col, r->left_col);
2747 resize_root_window (window, delta, Qt, Qnil); 2750 resize_root_window (window, delta, Qt, Qnil);
2748 if (window_resize_check (w, 1)) 2751 if (window_resize_check (w, 1))
@@ -2915,7 +2918,7 @@ adjust_window_margins (struct window *w)
2915 if (WINDOW_LEFT_MARGIN_COLS (w) > 0) 2918 if (WINDOW_LEFT_MARGIN_COLS (w) > 0)
2916 { 2919 {
2917 WSET (w, left_margin_cols, make_number (margin_cols / 2)); 2920 WSET (w, left_margin_cols, make_number (margin_cols / 2));
2918 WSET (w, right_margin_cols, make_number (margin_cols / 2)); 2921 WSET (w, right_margin_cols, make_number (margin_cols / 2));
2919 } 2922 }
2920 else 2923 else
2921 WSET (w, right_margin_cols, make_number (margin_cols)); 2924 WSET (w, right_margin_cols, make_number (margin_cols));
@@ -3612,7 +3615,7 @@ resize_frame_windows (struct frame *f, int size, int horflag)
3612 else 3615 else
3613 { 3616 {
3614 /* old_size is the old size of the frame's root window. */ 3617 /* old_size is the old size of the frame's root window. */
3615 int old_size = XFASTINT (horflag ? r->total_cols 3618 int old_size = XFASTINT (horflag ? r->total_cols
3616 : r->total_lines); 3619 : r->total_lines);
3617 Lisp_Object delta; 3620 Lisp_Object delta;
3618 3621
@@ -4000,7 +4003,7 @@ Signal an error when WINDOW is the only window on its frame. */)
4000 if (EQ (FRAME_SELECTED_WINDOW (f), selected_window)) 4003 if (EQ (FRAME_SELECTED_WINDOW (f), selected_window))
4001 Fselect_window (new_selected_window, Qt); 4004 Fselect_window (new_selected_window, Qt);
4002 else 4005 else
4003 FSET (f, selected_window, new_selected_window); 4006 fset_selected_window (f, new_selected_window);
4004 4007
4005 UNBLOCK_INPUT; 4008 UNBLOCK_INPUT;
4006 4009
@@ -4014,7 +4017,7 @@ Signal an error when WINDOW is the only window on its frame. */)
4014 if (EQ (FRAME_SELECTED_WINDOW (f), selected_window)) 4017 if (EQ (FRAME_SELECTED_WINDOW (f), selected_window))
4015 Fselect_window (new_selected_window, Qnil); 4018 Fselect_window (new_selected_window, Qnil);
4016 else 4019 else
4017 FSET (f, selected_window, new_selected_window); 4020 fset_selected_window (f, new_selected_window);
4018 } 4021 }
4019 else 4022 else
4020 UNBLOCK_INPUT; 4023 UNBLOCK_INPUT;
@@ -5542,7 +5545,7 @@ the return value is nil. Otherwise the value is t. */)
5542 WSET (w, next, Qnil); 5545 WSET (w, next, Qnil);
5543 5546
5544 if (!NILP (p->parent)) 5547 if (!NILP (p->parent))
5545 WSET (w, parent, SAVED_WINDOW_N 5548 WSET (w, parent, SAVED_WINDOW_N
5546 (saved_windows, XFASTINT (p->parent))->window); 5549 (saved_windows, XFASTINT (p->parent))->window);
5547 else 5550 else
5548 WSET (w, parent, Qnil); 5551 WSET (w, parent, Qnil);
@@ -5650,7 +5653,7 @@ the return value is nil. Otherwise the value is t. */)
5650 set_marker_restricted (w->start, make_number (0), 5653 set_marker_restricted (w->start, make_number (0),
5651 w->buffer); 5654 w->buffer);
5652 if (XMARKER (w->pointm)->buffer == 0) 5655 if (XMARKER (w->pointm)->buffer == 0)
5653 set_marker_restricted_both 5656 set_marker_restricted_both
5654 (w->pointm, w->buffer, 5657 (w->pointm, w->buffer,
5655 BUF_PT (XBUFFER (w->buffer)), 5658 BUF_PT (XBUFFER (w->buffer)),
5656 BUF_PT_BYTE (XBUFFER (w->buffer))); 5659 BUF_PT_BYTE (XBUFFER (w->buffer)));
@@ -5690,7 +5693,7 @@ the return value is nil. Otherwise the value is t. */)
5690 } 5693 }
5691 } 5694 }
5692 5695
5693 FSET (f, root_window, data->root_window); 5696 fset_root_window (f, data->root_window);
5694 /* Arrange *not* to restore point in the buffer that was 5697 /* Arrange *not* to restore point in the buffer that was
5695 current when the window configuration was saved. */ 5698 current when the window configuration was saved. */
5696 if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer)) 5699 if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer))