aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorKaroly Lorentey2005-10-09 20:00:17 +0000
committerKaroly Lorentey2005-10-09 20:00:17 +0000
commit0ff21b4e57b1dc7c714c21c9eea1a4906630ecf2 (patch)
tree3e8596405b243531128cd0f1d8f59d2ab9e7f7c7 /src/window.c
parenta3c07f683d1f9fbf7c7af0120dfebc5fc34b61fa (diff)
parent20ef86730cca82a1a2e212a665c0b119ed2d70b2 (diff)
downloademacs-0ff21b4e57b1dc7c714c21c9eea1a4906630ecf2.tar.gz
emacs-0ff21b4e57b1dc7c714c21c9eea1a4906630ecf2.zip
Merged from miles@gnu.org--gnu-2005 (patch 118-132, 551-577)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-551 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-552 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-553 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-554 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-555 Remove CVS keywords from newsticker files * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-556 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-557 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-558 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-559 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-560 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-561 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-562 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-563 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-564 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-565 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-566 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-567 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-568 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-569 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-570 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-571 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-572 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-573 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-574 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-575 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-576 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-577 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-118 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-119 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-120 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-121 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-122 Update from CVS: lisp/mm-url.el (mm-url-decode-entities): Fix regexp. * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-123 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-124 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-125 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-126 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-127 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-128 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-129 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-130 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-131 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-132 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-423
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c112
1 files changed, 93 insertions, 19 deletions
diff --git a/src/window.c b/src/window.c
index 3140bbaf001..9a78ef1ed36 100644
--- a/src/window.c
+++ b/src/window.c
@@ -275,7 +275,6 @@ make_window ()
275 XSETWINDOW (val, p); 275 XSETWINDOW (val, p);
276 XSETFASTINT (p->last_point, 0); 276 XSETFASTINT (p->last_point, 0);
277 p->frozen_window_start_p = 0; 277 p->frozen_window_start_p = 0;
278 p->height_fixed_p = 0;
279 p->last_cursor_off_p = p->cursor_off_p = 0; 278 p->last_cursor_off_p = p->cursor_off_p = 0;
280 p->left_margin_cols = Qnil; 279 p->left_margin_cols = Qnil;
281 p->right_margin_cols = Qnil; 280 p->right_margin_cols = Qnil;
@@ -2440,27 +2439,22 @@ window_fixed_size_p (w, width_p, check_siblings_p)
2440 } 2439 }
2441 else if (BUFFERP (w->buffer)) 2440 else if (BUFFERP (w->buffer))
2442 { 2441 {
2443 if (w->height_fixed_p && !width_p) 2442 struct buffer *old = current_buffer;
2444 fixed_p = 1; 2443 Lisp_Object val;
2445 else
2446 {
2447 struct buffer *old = current_buffer;
2448 Lisp_Object val;
2449 2444
2450 current_buffer = XBUFFER (w->buffer); 2445 current_buffer = XBUFFER (w->buffer);
2451 val = find_symbol_value (Qwindow_size_fixed); 2446 val = find_symbol_value (Qwindow_size_fixed);
2452 current_buffer = old; 2447 current_buffer = old;
2453 2448
2454 fixed_p = 0; 2449 fixed_p = 0;
2455 if (!EQ (val, Qunbound)) 2450 if (!EQ (val, Qunbound))
2456 { 2451 {
2457 fixed_p = !NILP (val); 2452 fixed_p = !NILP (val);
2458 2453
2459 if (fixed_p 2454 if (fixed_p
2460 && ((EQ (val, Qheight) && width_p) 2455 && ((EQ (val, Qheight) && width_p)
2461 || (EQ (val, Qwidth) && !width_p))) 2456 || (EQ (val, Qwidth) && !width_p)))
2462 fixed_p = 0; 2457 fixed_p = 0;
2463 }
2464 } 2458 }
2465 2459
2466 /* Can't tell if this one is resizable without looking at 2460 /* Can't tell if this one is resizable without looking at
@@ -6233,6 +6227,85 @@ usage: (save-window-excursion BODY ...) */)
6233 return unbind_to (count, val); 6227 return unbind_to (count, val);
6234} 6228}
6235 6229
6230
6231
6232/***********************************************************************
6233 Window Split Tree
6234 ***********************************************************************/
6235
6236static Lisp_Object
6237window_split_tree (w)
6238 struct window *w;
6239{
6240 Lisp_Object tail = Qnil;
6241 Lisp_Object result = Qnil;
6242
6243 while (w)
6244 {
6245 Lisp_Object wn;
6246
6247 XSETWINDOW (wn, w);
6248 if (!NILP (w->hchild))
6249 wn = Fcons (Qnil, Fcons (Fwindow_edges (wn),
6250 window_split_tree (XWINDOW (w->hchild))));
6251 else if (!NILP (w->vchild))
6252 wn = Fcons (Qt, Fcons (Fwindow_edges (wn),
6253 window_split_tree (XWINDOW (w->vchild))));
6254
6255 if (NILP (result))
6256 {
6257 result = tail = Fcons (wn, Qnil);
6258 }
6259 else
6260 {
6261 XSETCDR (tail, Fcons (wn, Qnil));
6262 tail = XCDR (tail);
6263 }
6264
6265 w = NILP (w->next) ? 0 : XWINDOW (w->next);
6266 }
6267
6268 return result;
6269}
6270
6271
6272
6273DEFUN ("window-split-tree", Fwindow_split_tree, Swindow_split_tree,
6274 0, 1, 0,
6275 doc: /* Return the window split tree for frame FRAME.
6276
6277The return value is a list of the form (ROOT MINI), where ROOT
6278represents the window split tree of the frame's root window, and MINI
6279is the frame's minibuffer window.
6280
6281If the root window is not split, ROOT is the root window itself.
6282Otherwise, ROOT is a list (DIR EDGES W1 W2 ...) where DIR is nil for a
6283horisontal split, and t for a vertical split, EDGES gives the combined
6284size and position of the subwindows in the split, and the rest of the
6285elements are the subwindows in the split. Each of the subwindows may
6286again be a window or a list representing a window split, and so on.
6287EDGES is a list \(LEFT TOP RIGHT BOTTOM) as returned by `window-edges'.
6288
6289If FRAME is nil or omitted, return information on the currently
6290selected frame. */)
6291 (frame)
6292 Lisp_Object frame;
6293{
6294 Lisp_Object alist;
6295 FRAME_PTR f;
6296
6297 if (NILP (frame))
6298 frame = selected_frame;
6299
6300 CHECK_FRAME (frame);
6301 f = XFRAME (frame);
6302
6303 if (!FRAME_LIVE_P (f))
6304 return Qnil;
6305
6306 return window_split_tree (XWINDOW (FRAME_ROOT_WINDOW (f)));
6307}
6308
6236 6309
6237/*********************************************************************** 6310/***********************************************************************
6238 Marginal Areas 6311 Marginal Areas
@@ -7039,6 +7112,7 @@ The selected frame is the one whose configuration has changed. */);
7039 defsubr (&Sset_window_configuration); 7112 defsubr (&Sset_window_configuration);
7040 defsubr (&Scurrent_window_configuration); 7113 defsubr (&Scurrent_window_configuration);
7041 defsubr (&Ssave_window_excursion); 7114 defsubr (&Ssave_window_excursion);
7115 defsubr (&Swindow_split_tree);
7042 defsubr (&Sset_window_margins); 7116 defsubr (&Sset_window_margins);
7043 defsubr (&Swindow_margins); 7117 defsubr (&Swindow_margins);
7044 defsubr (&Sset_window_fringes); 7118 defsubr (&Sset_window_fringes);