diff options
| author | Martin Rudalics | 2011-11-16 11:10:40 +0100 |
|---|---|---|
| committer | Martin Rudalics | 2011-11-16 11:10:40 +0100 |
| commit | b6f6789018b0bd41368126cfb45307334d6ff4d6 (patch) | |
| tree | eb2f35085b12fa731c3dcfdb82ac97abafc913a7 /src | |
| parent | ce7ddba00114b8876179e87c222fd8697da19ac0 (diff) | |
| download | emacs-b6f6789018b0bd41368126cfb45307334d6ff4d6.tar.gz emacs-b6f6789018b0bd41368126cfb45307334d6ff4d6.zip | |
Rename window-nest to window-combination-limit.
* window.h (window): Rename slot "nest" to "combination_limit".
* window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
(Fset_window_nest): Rename to Fset_window_combination_limit.
(Vwindow_nest): Rename to Vwindow_combination_limit.
(recombine_windows, make_parent_window, make_window)
(Fsplit_window_internal, saved_window)
(Fset_window_configuration, save_window_save): Rename all
occurrences of window_nest to window_combination_limit.
* window.el (split-window, window-state-get-1)
(window-state-put-1, window-state-put-2): Rename occurrences of
window-nest to window-combination-limit.
* cus-start.el (window-nest): Rename to
window-combination-limit.
* windows.texi (Resizing Windows, Splitting Windows): Rename
occurrences of window-nest to window-combination-limit.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 11 | ||||
| -rw-r--r-- | src/window.c | 88 | ||||
| -rw-r--r-- | src/window.h | 5 |
3 files changed, 60 insertions, 44 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e8bd3ac3e1f..0cbf2274ff9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2011-11-16 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * window.h (window): Rename slot "nest" to "combination_limit". | ||
| 4 | * window.c (Fwindow_nest): Rename to Fwindow_combination_limit. | ||
| 5 | (Fset_window_nest): Rename to Fset_window_combination_limit. | ||
| 6 | (Vwindow_nest): Rename to Vwindow_combination_limit. | ||
| 7 | (recombine_windows, make_parent_window, make_window) | ||
| 8 | (Fsplit_window_internal, saved_window) | ||
| 9 | (Fset_window_configuration, save_window_save): Rename all | ||
| 10 | occurrences of window_nest to window_combination_limit. | ||
| 11 | |||
| 1 | 2011-11-15 Juanma Barranquero <lekktu@gmail.com> | 12 | 2011-11-15 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 13 | ||
| 3 | * image.c (imagemagick_load_image): Fix typo. | 14 | * image.c (imagemagick_load_image): Fix typo. |
diff --git a/src/window.c b/src/window.c index 9c7e1349011..1b344773b1a 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -465,32 +465,33 @@ 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-nest", Fwindow_nest, Swindow_nest, 0, 1, 0, | 468 | DEFUN ("window-combination-limit", Fwindow_combination_limit, Swindow_combination_limit, 0, 1, 0, |
| 469 | doc: /* Return nest status of window WINDOW. | 469 | doc: /* Return combination limit of window WINDOW. |
| 470 | 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. |
| 471 | 471 | ||
| 472 | If the return value is nil, child windows of WINDOW can be recombined with | 472 | If the return value is nil, child windows of WINDOW can be recombined with |
| 473 | WINDOW's siblings. A return value of non-nil means that child windows of | 473 | WINDOW's siblings. A return value of t means that child windows of |
| 474 | WINDOW are never \(re-)combined with WINDOW's siblings. */) | 474 | WINDOW are never \(re-)combined with WINDOW's siblings. */) |
| 475 | (Lisp_Object window) | 475 | (Lisp_Object window) |
| 476 | { | 476 | { |
| 477 | return decode_any_window (window)->nest; | 477 | return decode_any_window (window)->combination_limit; |
| 478 | } | 478 | } |
| 479 | 479 | ||
| 480 | DEFUN ("set-window-nest", Fset_window_nest, Sset_window_nest, 2, 2, 0, | 480 | DEFUN ("set-window-combination-limit", Fset_window_combination_limit, Sset_window_combination_limit, 2, 2, 0, |
| 481 | doc: /* Set nest status of window WINDOW to STATUS; return STATUS. | 481 | doc: /* Set combination limit of window WINDOW to STATUS; return STATUS. |
| 482 | If WINDOW is omitted or nil, it defaults to the selected window. | 482 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 483 | 483 | ||
| 484 | If STATUS is nil, child windows of WINDOW can be recombined with WINDOW's | 484 | If STATUS is nil, child windows of WINDOW can be recombined with |
| 485 | siblings. STATUS non-nil means that child windows of WINDOW are never | 485 | WINDOW's siblings. STATUS t means that child windows of WINDOW are |
| 486 | \(re-)combined with WINDOW's siblings. */) | 486 | never \(re-)combined with WINDOW's siblings. Other values are reserved |
| 487 | for future use. */) | ||
| 487 | (Lisp_Object window, Lisp_Object status) | 488 | (Lisp_Object window, Lisp_Object status) |
| 488 | { | 489 | { |
| 489 | register struct window *w = decode_any_window (window); | 490 | register struct window *w = decode_any_window (window); |
| 490 | 491 | ||
| 491 | w->nest = status; | 492 | w->combination_limit = status; |
| 492 | 493 | ||
| 493 | return w->nest; | 494 | return w->combination_limit; |
| 494 | } | 495 | } |
| 495 | 496 | ||
| 496 | DEFUN ("window-use-time", Fwindow_use_time, Swindow_use_time, 0, 1, 0, | 497 | DEFUN ("window-use-time", Fwindow_use_time, Swindow_use_time, 0, 1, 0, |
| @@ -1879,7 +1880,7 @@ recombine_windows (Lisp_Object window) | |||
| 1879 | 1880 | ||
| 1880 | w = XWINDOW (window); | 1881 | w = XWINDOW (window); |
| 1881 | parent = w->parent; | 1882 | parent = w->parent; |
| 1882 | if (!NILP (parent) && NILP (w->nest)) | 1883 | if (!NILP (parent) && NILP (w->combination_limit)) |
| 1883 | { | 1884 | { |
| 1884 | p = XWINDOW (parent); | 1885 | p = XWINDOW (parent); |
| 1885 | if (((!NILP (p->vchild) && !NILP (w->vchild)) | 1886 | if (((!NILP (p->vchild) && !NILP (w->vchild)) |
| @@ -3248,7 +3249,7 @@ make_parent_window (Lisp_Object window, int horflag) | |||
| 3248 | p->start = Qnil; | 3249 | p->start = Qnil; |
| 3249 | p->pointm = Qnil; | 3250 | p->pointm = Qnil; |
| 3250 | p->buffer = Qnil; | 3251 | p->buffer = Qnil; |
| 3251 | p->nest = Qnil; | 3252 | p->combination_limit = Qnil; |
| 3252 | p->window_parameters = Qnil; | 3253 | p->window_parameters = Qnil; |
| 3253 | } | 3254 | } |
| 3254 | 3255 | ||
| @@ -3295,7 +3296,7 @@ make_window (void) | |||
| 3295 | w->start_at_line_beg = w->display_table = w->dedicated = Qnil; | 3296 | w->start_at_line_beg = w->display_table = w->dedicated = Qnil; |
| 3296 | w->base_line_number = w->base_line_pos = w->region_showing = Qnil; | 3297 | w->base_line_number = w->base_line_pos = w->region_showing = Qnil; |
| 3297 | w->column_number_displayed = w->redisplay_end_trigger = Qnil; | 3298 | w->column_number_displayed = w->redisplay_end_trigger = Qnil; |
| 3298 | w->nest = w->window_parameters = Qnil; | 3299 | w->combination_limit = w->window_parameters = Qnil; |
| 3299 | w->prev_buffers = w->next_buffers = Qnil; | 3300 | w->prev_buffers = w->next_buffers = Qnil; |
| 3300 | /* Initialize non-Lisp data. */ | 3301 | /* Initialize non-Lisp data. */ |
| 3301 | w->desired_matrix = w->current_matrix = 0; | 3302 | w->desired_matrix = w->current_matrix = 0; |
| @@ -3668,7 +3669,7 @@ set correctly. See the code of `split-window' for how this is done. */) | |||
| 3668 | int horflag | 3669 | int horflag |
| 3669 | /* HORFLAG is 1 when we split side-by-side, 0 otherwise. */ | 3670 | /* HORFLAG is 1 when we split side-by-side, 0 otherwise. */ |
| 3670 | = EQ (side, Qt) || EQ (side, Qleft) || EQ (side, Qright); | 3671 | = EQ (side, Qt) || EQ (side, Qleft) || EQ (side, Qright); |
| 3671 | int do_nest = 0; | 3672 | int combination_limit = 0; |
| 3672 | 3673 | ||
| 3673 | CHECK_WINDOW (old); | 3674 | CHECK_WINDOW (old); |
| 3674 | o = XWINDOW (old); | 3675 | o = XWINDOW (old); |
| @@ -3677,11 +3678,11 @@ set correctly. See the code of `split-window' for how this is done. */) | |||
| 3677 | 3678 | ||
| 3678 | CHECK_NUMBER (total_size); | 3679 | CHECK_NUMBER (total_size); |
| 3679 | 3680 | ||
| 3680 | /* Set do_nest to 1 if we have to make a new parent window. We do | 3681 | /* Set combination_limit to 1 if we have to make a new parent window. |
| 3681 | that if either `window-nest' is non-nil, or OLD has no parent, or | 3682 | We do that if either `window-combination-limit' is t, or OLD has no |
| 3682 | OLD is ortho-combined. */ | 3683 | parent, or OLD is ortho-combined. */ |
| 3683 | do_nest = | 3684 | combination_limit = |
| 3684 | !NILP (Vwindow_nest) | 3685 | !NILP (Vwindow_combination_limit) |
| 3685 | || NILP (o->parent) | 3686 | || NILP (o->parent) |
| 3686 | || NILP (horflag | 3687 | || NILP (horflag |
| 3687 | ? (XWINDOW (o->parent)->hchild) | 3688 | ? (XWINDOW (o->parent)->hchild) |
| @@ -3701,7 +3702,7 @@ set correctly. See the code of `split-window' for how this is done. */) | |||
| 3701 | error ("Attempt to split minibuffer window"); | 3702 | error ("Attempt to split minibuffer window"); |
| 3702 | else if (XINT (total_size) < (horflag ? 2 : 1)) | 3703 | else if (XINT (total_size) < (horflag ? 2 : 1)) |
| 3703 | error ("Size of new window too small (after split)"); | 3704 | error ("Size of new window too small (after split)"); |
| 3704 | else if (!do_nest && !NILP (Vwindow_splits)) | 3705 | else if (!combination_limit && !NILP (Vwindow_splits)) |
| 3705 | /* `window-splits' non-nil means try to resize OLD's siblings | 3706 | /* `window-splits' non-nil means try to resize OLD's siblings |
| 3706 | proportionally. */ | 3707 | proportionally. */ |
| 3707 | { | 3708 | { |
| @@ -3726,7 +3727,7 @@ set correctly. See the code of `split-window' for how this is done. */) | |||
| 3726 | } | 3727 | } |
| 3727 | 3728 | ||
| 3728 | /* This is our point of no return. */ | 3729 | /* This is our point of no return. */ |
| 3729 | if (do_nest) | 3730 | if (combination_limit) |
| 3730 | { | 3731 | { |
| 3731 | /* Save the old value of o->normal_cols/lines. It gets corrupted | 3732 | /* Save the old value of o->normal_cols/lines. It gets corrupted |
| 3732 | by make_parent_window and we need it below for assigning it to | 3733 | by make_parent_window and we need it below for assigning it to |
| @@ -3735,8 +3736,9 @@ set correctly. See the code of `split-window' for how this is done. */) | |||
| 3735 | 3736 | ||
| 3736 | make_parent_window (old, horflag); | 3737 | make_parent_window (old, horflag); |
| 3737 | p = XWINDOW (o->parent); | 3738 | p = XWINDOW (o->parent); |
| 3738 | /* Store value of `window-nest' in new parent's nest slot. */ | 3739 | /* Store value of `window-combination-limit' in new parent's |
| 3739 | p->nest = Vwindow_nest; | 3740 | combination_limit slot. */ |
| 3741 | p->combination_limit = Vwindow_combination_limit; | ||
| 3740 | /* These get applied below. */ | 3742 | /* These get applied below. */ |
| 3741 | p->new_total = horflag ? o->total_cols : o->total_lines; | 3743 | p->new_total = horflag ? o->total_cols : o->total_lines; |
| 3742 | p->new_normal = new_normal; | 3744 | p->new_normal = new_normal; |
| @@ -3923,7 +3925,7 @@ Signal an error when WINDOW is the only window on its frame. */) | |||
| 3923 | /* Put SIBLING into PARENT's place. */ | 3925 | /* Put SIBLING into PARENT's place. */ |
| 3924 | replace_window (parent, sibling, 0); | 3926 | replace_window (parent, sibling, 0); |
| 3925 | /* Have SIBLING inherit the following three slot values from | 3927 | /* Have SIBLING inherit the following three slot values from |
| 3926 | PARENT (the nest slot is not inherited). */ | 3928 | PARENT (the combination_limit slot is not inherited). */ |
| 3927 | s->normal_cols = p->normal_cols; | 3929 | s->normal_cols = p->normal_cols; |
| 3928 | s->normal_lines = p->normal_lines; | 3930 | s->normal_lines = p->normal_lines; |
| 3929 | /* Mark PARENT as deleted. */ | 3931 | /* Mark PARENT as deleted. */ |
| @@ -5312,7 +5314,7 @@ struct saved_window | |||
| 5312 | Lisp_Object left_margin_cols, right_margin_cols; | 5314 | Lisp_Object left_margin_cols, right_margin_cols; |
| 5313 | Lisp_Object left_fringe_width, right_fringe_width, fringes_outside_margins; | 5315 | Lisp_Object left_fringe_width, right_fringe_width, fringes_outside_margins; |
| 5314 | Lisp_Object scroll_bar_width, vertical_scroll_bar_type, dedicated; | 5316 | Lisp_Object scroll_bar_width, vertical_scroll_bar_type, dedicated; |
| 5315 | Lisp_Object nest, window_parameters; | 5317 | Lisp_Object combination_limit, window_parameters; |
| 5316 | }; | 5318 | }; |
| 5317 | 5319 | ||
| 5318 | #define SAVED_WINDOW_N(swv,n) \ | 5320 | #define SAVED_WINDOW_N(swv,n) \ |
| @@ -5543,7 +5545,7 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5543 | w->scroll_bar_width = p->scroll_bar_width; | 5545 | w->scroll_bar_width = p->scroll_bar_width; |
| 5544 | w->vertical_scroll_bar_type = p->vertical_scroll_bar_type; | 5546 | w->vertical_scroll_bar_type = p->vertical_scroll_bar_type; |
| 5545 | w->dedicated = p->dedicated; | 5547 | w->dedicated = p->dedicated; |
| 5546 | w->nest = p->nest; | 5548 | w->combination_limit = p->combination_limit; |
| 5547 | w->window_parameters = p->window_parameters; | 5549 | w->window_parameters = p->window_parameters; |
| 5548 | XSETFASTINT (w->last_modified, 0); | 5550 | XSETFASTINT (w->last_modified, 0); |
| 5549 | XSETFASTINT (w->last_overlay_modified, 0); | 5551 | XSETFASTINT (w->last_overlay_modified, 0); |
| @@ -5821,7 +5823,7 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i) | |||
| 5821 | p->scroll_bar_width = w->scroll_bar_width; | 5823 | p->scroll_bar_width = w->scroll_bar_width; |
| 5822 | p->vertical_scroll_bar_type = w->vertical_scroll_bar_type; | 5824 | p->vertical_scroll_bar_type = w->vertical_scroll_bar_type; |
| 5823 | p->dedicated = w->dedicated; | 5825 | p->dedicated = w->dedicated; |
| 5824 | p->nest = w->nest; | 5826 | p->combination_limit = w->combination_limit; |
| 5825 | p->window_parameters = w->window_parameters; | 5827 | p->window_parameters = w->window_parameters; |
| 5826 | if (!NILP (w->buffer)) | 5828 | if (!NILP (w->buffer)) |
| 5827 | { | 5829 | { |
| @@ -6284,7 +6286,8 @@ freeze_window_starts (struct frame *f, int freeze_p) | |||
| 6284 | and the like. | 6286 | and the like. |
| 6285 | 6287 | ||
| 6286 | This ignores a couple of things like the dedicatedness status of | 6288 | This ignores a couple of things like the dedicatedness status of |
| 6287 | window, nest and the like. This might have to be fixed. */ | 6289 | window, combination_limit and the like. This might have to be |
| 6290 | fixed. */ | ||
| 6288 | 6291 | ||
| 6289 | int | 6292 | int |
| 6290 | compare_window_configurations (Lisp_Object configuration1, Lisp_Object configuration2, int ignore_positions) | 6293 | compare_window_configurations (Lisp_Object configuration1, Lisp_Object configuration2, int ignore_positions) |
| @@ -6496,24 +6499,27 @@ variable is non-nil, splitting a window may resize all windows in the | |||
| 6496 | same combination. This also allows to split a window that is otherwise | 6499 | same combination. This also allows to split a window that is otherwise |
| 6497 | too small or of fixed size. | 6500 | too small or of fixed size. |
| 6498 | 6501 | ||
| 6499 | This variable takes no effect if `window-nest' is non-nil. */); | 6502 | This variable takes no effect if `window-combination-limit' is non-nil. */); |
| 6500 | Vwindow_splits = Qnil; | 6503 | Vwindow_splits = Qnil; |
| 6501 | 6504 | ||
| 6502 | DEFVAR_LISP ("window-nest", Vwindow_nest, | 6505 | DEFVAR_LISP ("window-combination-limit", Vwindow_combination_limit, |
| 6503 | doc: /* Non-nil means splitting a window makes a new parent window. | 6506 | doc: /* Non-nil means splitting a window makes a new parent window. |
| 6504 | If this variable is nil, splitting a window will create a new parent | 6507 | If this variable is nil, splitting a window will create a new parent |
| 6505 | window only if the window has no parent window or the window shall | 6508 | window only if the window has no parent window or the window shall |
| 6506 | become a combination orthogonal to the one it it is part of. | 6509 | become a combination orthogonal to the one it it is part of. |
| 6507 | 6510 | ||
| 6508 | If this variable is non-nil, splitting a window always creates a new | 6511 | If this variable is t, splitting a window always creates a new parent |
| 6509 | parent window. If all splits behave this way, each frame's window tree | 6512 | window. If all splits behave this way, each frame's window tree is a |
| 6510 | is a binary tree and every window but the frame's root window has | 6513 | binary tree and every window but the frame's root window has exactly one |
| 6511 | exactly one sibling. | 6514 | sibling. |
| 6512 | 6515 | ||
| 6513 | The value of this variable is also assigned to the nest status of the | 6516 | Other values are reserved for future use. |
| 6514 | new parent window. The nest status of a window can be retrieved via the | 6517 | |
| 6515 | function `window-nest' and altered by the function `set-window-nest'. */); | 6518 | The value of this variable is also assigned to the combination_limit |
| 6516 | Vwindow_nest = Qnil; | 6519 | status of the new parent window. The combination-limit status of a |
| 6520 | window can be retrieved via the function `window-combination-limit' and | ||
| 6521 | altered by the function `set-window-combination-limit'. */); | ||
| 6522 | Vwindow_combination_limit = Qnil; | ||
| 6517 | 6523 | ||
| 6518 | defsubr (&Sselected_window); | 6524 | defsubr (&Sselected_window); |
| 6519 | defsubr (&Sminibuffer_window); | 6525 | defsubr (&Sminibuffer_window); |
| @@ -6533,8 +6539,8 @@ function `window-nest' and altered by the function `set-window-nest'. */); | |||
| 6533 | defsubr (&Swindow_left_child); | 6539 | defsubr (&Swindow_left_child); |
| 6534 | defsubr (&Swindow_next_sibling); | 6540 | defsubr (&Swindow_next_sibling); |
| 6535 | defsubr (&Swindow_prev_sibling); | 6541 | defsubr (&Swindow_prev_sibling); |
| 6536 | defsubr (&Swindow_nest); | 6542 | defsubr (&Swindow_combination_limit); |
| 6537 | defsubr (&Sset_window_nest); | 6543 | defsubr (&Sset_window_combination_limit); |
| 6538 | defsubr (&Swindow_use_time); | 6544 | defsubr (&Swindow_use_time); |
| 6539 | defsubr (&Swindow_top_line); | 6545 | defsubr (&Swindow_top_line); |
| 6540 | defsubr (&Swindow_left_column); | 6546 | defsubr (&Swindow_left_column); |
diff --git a/src/window.h b/src/window.h index c11235bd67b..de0f7307a51 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -258,9 +258,8 @@ struct window | |||
| 258 | must run the redisplay-end-trigger-hook. */ | 258 | must run the redisplay-end-trigger-hook. */ |
| 259 | Lisp_Object redisplay_end_trigger; | 259 | Lisp_Object redisplay_end_trigger; |
| 260 | 260 | ||
| 261 | /* Non-nil means this window's child windows are never | 261 | /* t means this window's child windows are not (re-)combined. */ |
| 262 | (re-)combined. */ | 262 | Lisp_Object combination_limit; |
| 263 | Lisp_Object nest; | ||
| 264 | 263 | ||
| 265 | /* Alist of <buffer, window-start, window-point> triples listing | 264 | /* Alist of <buffer, window-start, window-point> triples listing |
| 266 | buffers previously shown in this window. */ | 265 | buffers previously shown in this window. */ |