diff options
| author | Paul Eggert | 2011-11-13 20:35:22 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-11-13 20:35:22 -0800 |
| commit | c3ca24d48c10fb771ee02eb58f7d49bd82d6306e (patch) | |
| tree | e707b79a846623490feea39a4dceb86dd218eb4d /src/window.c | |
| parent | 6a0bf43d7c5961297aa5024aec534e5bab73c8af (diff) | |
| parent | 56632ce4cd8616f0613e8734d62ec5e2f833c7dc (diff) | |
| download | emacs-c3ca24d48c10fb771ee02eb58f7d49bd82d6306e.tar.gz emacs-c3ca24d48c10fb771ee02eb58f7d49bd82d6306e.zip | |
Merge from trunk.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 68 |
1 files changed, 4 insertions, 64 deletions
diff --git a/src/window.c b/src/window.c index 83a8974e88d..0a780a0170a 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -465,41 +465,6 @@ Return nil if WINDOW has no previous sibling. */) | |||
| 465 | return decode_any_window (window)->prev; | 465 | return decode_any_window (window)->prev; |
| 466 | } | 466 | } |
| 467 | 467 | ||
| 468 | DEFUN ("window-splits", Fwindow_splits, Swindow_splits, 0, 1, 0, | ||
| 469 | doc: /* Return splits status for the window WINDOW. | ||
| 470 | If WINDOW is omitted or nil, it defaults to the selected window. | ||
| 471 | |||
| 472 | If the value returned by this function is nil and WINDOW is resized, the | ||
| 473 | corresponding space is preferably taken from (or given to) WINDOW's | ||
| 474 | right sibling. When WINDOW is deleted, its space is given to its left | ||
| 475 | sibling. | ||
| 476 | |||
| 477 | If the value returned by this function is non-nil, resizing and deleting | ||
| 478 | WINDOW may resize all windows in the same combination. */) | ||
| 479 | (Lisp_Object window) | ||
| 480 | { | ||
| 481 | return decode_any_window (window)->splits; | ||
| 482 | } | ||
| 483 | |||
| 484 | DEFUN ("set-window-splits", Fset_window_splits, Sset_window_splits, 2, 2, 0, | ||
| 485 | doc: /* Set splits status of window WINDOW to STATUS. | ||
| 486 | If WINDOW is omitted or nil, it defaults to the selected window. | ||
| 487 | |||
| 488 | If STATUS is nil and WINDOW is later resized, the corresponding space is | ||
| 489 | preferably taken from (or given to) WINDOW's right sibling. When WINDOW | ||
| 490 | is deleted, its space is given to its left sibling. | ||
| 491 | |||
| 492 | If STATUS is non-nil, resizing and deleting WINDOW may resize all | ||
| 493 | windows in the same combination. */) | ||
| 494 | (Lisp_Object window, Lisp_Object status) | ||
| 495 | { | ||
| 496 | register struct window *w = decode_any_window (window); | ||
| 497 | |||
| 498 | w->splits = status; | ||
| 499 | |||
| 500 | return w->splits; | ||
| 501 | } | ||
| 502 | |||
| 503 | DEFUN ("window-nest", Fwindow_nest, Swindow_nest, 0, 1, 0, | 468 | DEFUN ("window-nest", Fwindow_nest, Swindow_nest, 0, 1, 0, |
| 504 | doc: /* Return nest status of window WINDOW. | 469 | doc: /* Return nest status of window WINDOW. |
| 505 | If WINDOW is omitted or nil, it defaults to the selected window. | 470 | If WINDOW is omitted or nil, it defaults to the selected window. |
| @@ -2769,9 +2734,6 @@ window-start value is reasonable when this function is called. */) | |||
| 2769 | 2734 | ||
| 2770 | replace_window (root, window, 1); | 2735 | replace_window (root, window, 1); |
| 2771 | 2736 | ||
| 2772 | /* Reset WINDOW's splits status. */ | ||
| 2773 | w->splits = Qnil; | ||
| 2774 | |||
| 2775 | /* This must become SWINDOW anyway ....... */ | 2737 | /* This must become SWINDOW anyway ....... */ |
| 2776 | if (!NILP (w->buffer) && !resize_failed) | 2738 | if (!NILP (w->buffer) && !resize_failed) |
| 2777 | { | 2739 | { |
| @@ -3286,7 +3248,6 @@ make_parent_window (Lisp_Object window, int horflag) | |||
| 3286 | p->start = Qnil; | 3248 | p->start = Qnil; |
| 3287 | p->pointm = Qnil; | 3249 | p->pointm = Qnil; |
| 3288 | p->buffer = Qnil; | 3250 | p->buffer = Qnil; |
| 3289 | p->splits = Qnil; | ||
| 3290 | p->nest = Qnil; | 3251 | p->nest = Qnil; |
| 3291 | p->window_parameters = Qnil; | 3252 | p->window_parameters = Qnil; |
| 3292 | } | 3253 | } |
| @@ -3334,7 +3295,7 @@ make_window (void) | |||
| 3334 | w->start_at_line_beg = w->display_table = w->dedicated = Qnil; | 3295 | w->start_at_line_beg = w->display_table = w->dedicated = Qnil; |
| 3335 | w->base_line_number = w->base_line_pos = w->region_showing = Qnil; | 3296 | w->base_line_number = w->base_line_pos = w->region_showing = Qnil; |
| 3336 | w->column_number_displayed = w->redisplay_end_trigger = Qnil; | 3297 | w->column_number_displayed = w->redisplay_end_trigger = Qnil; |
| 3337 | w->splits = w->nest = w->window_parameters = Qnil; | 3298 | w->nest = w->window_parameters = Qnil; |
| 3338 | w->prev_buffers = w->next_buffers = Qnil; | 3299 | w->prev_buffers = w->next_buffers = Qnil; |
| 3339 | /* Initialize non-Lisp data. */ | 3300 | /* Initialize non-Lisp data. */ |
| 3340 | w->desired_matrix = w->current_matrix = 0; | 3301 | w->desired_matrix = w->current_matrix = 0; |
| @@ -3776,10 +3737,6 @@ set correctly. See the code of `split-window' for how this is done. */) | |||
| 3776 | p = XWINDOW (o->parent); | 3737 | p = XWINDOW (o->parent); |
| 3777 | /* Store value of `window-nest' in new parent's nest slot. */ | 3738 | /* Store value of `window-nest' in new parent's nest slot. */ |
| 3778 | p->nest = Vwindow_nest; | 3739 | p->nest = Vwindow_nest; |
| 3779 | /* Have PARENT inherit splits slot value from OLD. */ | ||
| 3780 | p->splits = o->splits; | ||
| 3781 | /* Store value of `window-splits' in OLD's splits slot. */ | ||
| 3782 | o->splits = Vwindow_splits; | ||
| 3783 | /* These get applied below. */ | 3740 | /* These get applied below. */ |
| 3784 | p->new_total = horflag ? o->total_cols : o->total_lines; | 3741 | p->new_total = horflag ? o->total_cols : o->total_lines; |
| 3785 | p->new_normal = new_normal; | 3742 | p->new_normal = new_normal; |
| @@ -3830,9 +3787,6 @@ set correctly. See the code of `split-window' for how this is done. */) | |||
| 3830 | n->scroll_bar_width = r->scroll_bar_width; | 3787 | n->scroll_bar_width = r->scroll_bar_width; |
| 3831 | n->vertical_scroll_bar_type = r->vertical_scroll_bar_type; | 3788 | n->vertical_scroll_bar_type = r->vertical_scroll_bar_type; |
| 3832 | 3789 | ||
| 3833 | /* Store `window-splits' in NEW's splits slot. */ | ||
| 3834 | n->splits = Vwindow_splits; | ||
| 3835 | |||
| 3836 | /* Directly assign orthogonal coordinates and sizes. */ | 3790 | /* Directly assign orthogonal coordinates and sizes. */ |
| 3837 | if (horflag) | 3791 | if (horflag) |
| 3838 | { | 3792 | { |
| @@ -3972,7 +3926,6 @@ Signal an error when WINDOW is the only window on its frame. */) | |||
| 3972 | PARENT (the nest slot is not inherited). */ | 3926 | PARENT (the nest slot is not inherited). */ |
| 3973 | s->normal_cols = p->normal_cols; | 3927 | s->normal_cols = p->normal_cols; |
| 3974 | s->normal_lines = p->normal_lines; | 3928 | s->normal_lines = p->normal_lines; |
| 3975 | s->splits = p->splits; | ||
| 3976 | /* Mark PARENT as deleted. */ | 3929 | /* Mark PARENT as deleted. */ |
| 3977 | p->vchild = p->hchild = Qnil; | 3930 | p->vchild = p->hchild = Qnil; |
| 3978 | /* Try to merge SIBLING into its new parent. */ | 3931 | /* Try to merge SIBLING into its new parent. */ |
| @@ -5359,7 +5312,7 @@ struct saved_window | |||
| 5359 | Lisp_Object left_margin_cols, right_margin_cols; | 5312 | Lisp_Object left_margin_cols, right_margin_cols; |
| 5360 | Lisp_Object left_fringe_width, right_fringe_width, fringes_outside_margins; | 5313 | Lisp_Object left_fringe_width, right_fringe_width, fringes_outside_margins; |
| 5361 | Lisp_Object scroll_bar_width, vertical_scroll_bar_type, dedicated; | 5314 | Lisp_Object scroll_bar_width, vertical_scroll_bar_type, dedicated; |
| 5362 | Lisp_Object splits, nest, window_parameters; | 5315 | Lisp_Object nest, window_parameters; |
| 5363 | }; | 5316 | }; |
| 5364 | 5317 | ||
| 5365 | #define SAVED_WINDOW_N(swv,n) \ | 5318 | #define SAVED_WINDOW_N(swv,n) \ |
| @@ -5590,7 +5543,6 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5590 | w->scroll_bar_width = p->scroll_bar_width; | 5543 | w->scroll_bar_width = p->scroll_bar_width; |
| 5591 | w->vertical_scroll_bar_type = p->vertical_scroll_bar_type; | 5544 | w->vertical_scroll_bar_type = p->vertical_scroll_bar_type; |
| 5592 | w->dedicated = p->dedicated; | 5545 | w->dedicated = p->dedicated; |
| 5593 | w->splits = p->splits; | ||
| 5594 | w->nest = p->nest; | 5546 | w->nest = p->nest; |
| 5595 | w->window_parameters = p->window_parameters; | 5547 | w->window_parameters = p->window_parameters; |
| 5596 | XSETFASTINT (w->last_modified, 0); | 5548 | XSETFASTINT (w->last_modified, 0); |
| @@ -5869,7 +5821,6 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i) | |||
| 5869 | p->scroll_bar_width = w->scroll_bar_width; | 5821 | p->scroll_bar_width = w->scroll_bar_width; |
| 5870 | p->vertical_scroll_bar_type = w->vertical_scroll_bar_type; | 5822 | p->vertical_scroll_bar_type = w->vertical_scroll_bar_type; |
| 5871 | p->dedicated = w->dedicated; | 5823 | p->dedicated = w->dedicated; |
| 5872 | p->splits = w->splits; | ||
| 5873 | p->nest = w->nest; | 5824 | p->nest = w->nest; |
| 5874 | p->window_parameters = w->window_parameters; | 5825 | p->window_parameters = w->window_parameters; |
| 5875 | if (!NILP (w->buffer)) | 5826 | if (!NILP (w->buffer)) |
| @@ -6333,7 +6284,7 @@ freeze_window_starts (struct frame *f, int freeze_p) | |||
| 6333 | and the like. | 6284 | and the like. |
| 6334 | 6285 | ||
| 6335 | This ignores a couple of things like the dedicatedness status of | 6286 | This ignores a couple of things like the dedicatedness status of |
| 6336 | window, splits, nest and the like. This might have to be fixed. */ | 6287 | window, nest and the like. This might have to be fixed. */ |
| 6337 | 6288 | ||
| 6338 | int | 6289 | int |
| 6339 | compare_window_configurations (Lisp_Object configuration1, Lisp_Object configuration2, int ignore_positions) | 6290 | compare_window_configurations (Lisp_Object configuration1, Lisp_Object configuration2, int ignore_positions) |
| @@ -6545,16 +6496,7 @@ variable is non-nil, splitting a window may resize all windows in the | |||
| 6545 | same combination. This also allows to split a window that is otherwise | 6496 | same combination. This also allows to split a window that is otherwise |
| 6546 | too small or of fixed size. | 6497 | too small or of fixed size. |
| 6547 | 6498 | ||
| 6548 | The value of this variable is also assigned to the split status of the | 6499 | This variable takes no effect if `window-nest' is non-nil. */); |
| 6549 | new window and, provided the old and new window form a new combination, | ||
| 6550 | to the window that was split as well. The split status of a window can | ||
| 6551 | be retrieved with the function `window-splits' and altered by the | ||
| 6552 | function `set-window-splits'. | ||
| 6553 | |||
| 6554 | If the value of the variable `window-nest' is non-nil, the space for the | ||
| 6555 | new window is exclusively taken from the window that shall be split, but | ||
| 6556 | the split status of the window that is split as well as that of the new | ||
| 6557 | window are still set to the value of this variable. */); | ||
| 6558 | Vwindow_splits = Qnil; | 6500 | Vwindow_splits = Qnil; |
| 6559 | 6501 | ||
| 6560 | DEFVAR_LISP ("window-nest", Vwindow_nest, | 6502 | DEFVAR_LISP ("window-nest", Vwindow_nest, |
| @@ -6591,8 +6533,6 @@ function `window-nest' and altered by the function `set-window-nest'. */); | |||
| 6591 | defsubr (&Swindow_left_child); | 6533 | defsubr (&Swindow_left_child); |
| 6592 | defsubr (&Swindow_next_sibling); | 6534 | defsubr (&Swindow_next_sibling); |
| 6593 | defsubr (&Swindow_prev_sibling); | 6535 | defsubr (&Swindow_prev_sibling); |
| 6594 | defsubr (&Swindow_splits); | ||
| 6595 | defsubr (&Sset_window_splits); | ||
| 6596 | defsubr (&Swindow_nest); | 6536 | defsubr (&Swindow_nest); |
| 6597 | defsubr (&Sset_window_nest); | 6537 | defsubr (&Sset_window_nest); |
| 6598 | defsubr (&Swindow_use_time); | 6538 | defsubr (&Swindow_use_time); |