aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c54
1 files changed, 26 insertions, 28 deletions
diff --git a/src/window.c b/src/window.c
index c0cf06d5e46..3140bbaf001 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1,7 +1,7 @@
1/* Window creation, deletion and examination for GNU Emacs. 1/* Window creation, deletion and examination for GNU Emacs.
2 Does not include redisplay. 2 Does not include redisplay.
3 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 3 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
4 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 4 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
@@ -5626,8 +5626,6 @@ struct saved_window
5626 Lisp_Object scroll_bar_width, vertical_scroll_bar_type; 5626 Lisp_Object scroll_bar_width, vertical_scroll_bar_type;
5627}; 5627};
5628 5628
5629#define SAVED_WINDOW_VECTOR_SIZE 24 /* Arg to Fmake_vector */
5630
5631#define SAVED_WINDOW_N(swv,n) \ 5629#define SAVED_WINDOW_N(swv,n) \
5632 ((struct saved_window *) (XVECTOR ((swv)->contents[(n)]))) 5630 ((struct saved_window *) (XVECTOR ((swv)->contents[(n)])))
5633 5631
@@ -6207,7 +6205,7 @@ redirection (see `redirect-frame-focus'). */)
6207 data->saved_windows = tem; 6205 data->saved_windows = tem;
6208 for (i = 0; i < n_windows; i++) 6206 for (i = 0; i < n_windows; i++)
6209 XVECTOR (tem)->contents[i] 6207 XVECTOR (tem)->contents[i]
6210 = Fmake_vector (make_number (SAVED_WINDOW_VECTOR_SIZE), Qnil); 6208 = Fmake_vector (make_number (VECSIZE (struct saved_window)), Qnil);
6211 save_window_save (FRAME_ROOT_WINDOW (f), XVECTOR (tem), 0); 6209 save_window_save (FRAME_ROOT_WINDOW (f), XVECTOR (tem), 0);
6212 XSETWINDOW_CONFIGURATION (tem, data); 6210 XSETWINDOW_CONFIGURATION (tem, data);
6213 return (tem); 6211 return (tem);
@@ -6248,33 +6246,33 @@ Second arg LEFT-WIDTH specifies the number of character cells to
6248reserve for the left marginal area. Optional third arg RIGHT-WIDTH 6246reserve for the left marginal area. Optional third arg RIGHT-WIDTH
6249does the same for the right marginal area. A nil width parameter 6247does the same for the right marginal area. A nil width parameter
6250means no margin. */) 6248means no margin. */)
6251 (window, left, right) 6249 (window, left_width, right_width)
6252 Lisp_Object window, left, right; 6250 Lisp_Object window, left_width, right_width;
6253{ 6251{
6254 struct window *w = decode_window (window); 6252 struct window *w = decode_window (window);
6255 6253
6256 /* Translate negative or zero widths to nil. 6254 /* Translate negative or zero widths to nil.
6257 Margins that are too wide have to be checked elsewhere. */ 6255 Margins that are too wide have to be checked elsewhere. */
6258 6256
6259 if (!NILP (left)) 6257 if (!NILP (left_width))
6260 { 6258 {
6261 CHECK_NUMBER (left); 6259 CHECK_NUMBER (left_width);
6262 if (XINT (left) <= 0) 6260 if (XINT (left_width) <= 0)
6263 left = Qnil; 6261 left_width = Qnil;
6264 } 6262 }
6265 6263
6266 if (!NILP (right)) 6264 if (!NILP (right_width))
6267 { 6265 {
6268 CHECK_NUMBER (right); 6266 CHECK_NUMBER (right_width);
6269 if (XINT (right) <= 0) 6267 if (XINT (right_width) <= 0)
6270 right = Qnil; 6268 right_width = Qnil;
6271 } 6269 }
6272 6270
6273 if (!EQ (w->left_margin_cols, left) 6271 if (!EQ (w->left_margin_cols, left_width)
6274 || !EQ (w->right_margin_cols, right)) 6272 || !EQ (w->right_margin_cols, right_width))
6275 { 6273 {
6276 w->left_margin_cols = left; 6274 w->left_margin_cols = left_width;
6277 w->right_margin_cols = right; 6275 w->right_margin_cols = right_width;
6278 6276
6279 adjust_window_margins (w); 6277 adjust_window_margins (w);
6280 6278
@@ -6319,22 +6317,22 @@ the command `set-fringe-style'.
6319If optional fourth arg OUTSIDE-MARGINS is non-nil, draw the fringes 6317If optional fourth arg OUTSIDE-MARGINS is non-nil, draw the fringes
6320outside of the display margins. By default, fringes are drawn between 6318outside of the display margins. By default, fringes are drawn between
6321display marginal areas and the text area. */) 6319display marginal areas and the text area. */)
6322 (window, left, right, outside_margins) 6320 (window, left_width, right_width, outside_margins)
6323 Lisp_Object window, left, right, outside_margins; 6321 Lisp_Object window, left_width, right_width, outside_margins;
6324{ 6322{
6325 struct window *w = decode_window (window); 6323 struct window *w = decode_window (window);
6326 6324
6327 if (!NILP (left)) 6325 if (!NILP (left_width))
6328 CHECK_NATNUM (left); 6326 CHECK_NATNUM (left_width);
6329 if (!NILP (right)) 6327 if (!NILP (right_width))
6330 CHECK_NATNUM (right); 6328 CHECK_NATNUM (right_width);
6331 6329
6332 if (!EQ (w->left_fringe_width, left) 6330 if (!EQ (w->left_fringe_width, left_width)
6333 || !EQ (w->right_fringe_width, right) 6331 || !EQ (w->right_fringe_width, right_width)
6334 || !EQ (w->fringes_outside_margins, outside_margins)) 6332 || !EQ (w->fringes_outside_margins, outside_margins))
6335 { 6333 {
6336 w->left_fringe_width = left; 6334 w->left_fringe_width = left_width;
6337 w->right_fringe_width = right; 6335 w->right_fringe_width = right_width;
6338 w->fringes_outside_margins = outside_margins; 6336 w->fringes_outside_margins = outside_margins;
6339 6337
6340 adjust_window_margins (w); 6338 adjust_window_margins (w);