diff options
| author | Romain Francoise | 2007-09-12 11:32:02 +0000 |
|---|---|---|
| committer | Romain Francoise | 2007-09-12 11:32:02 +0000 |
| commit | 1971a872f581e842737b8a8a77356ec0130c1a20 (patch) | |
| tree | f12514a973d04b060fe421d9550ba8bdd01a0de8 /src | |
| parent | 585474ae0b3f81a961dfe9bed73bb2246dc85290 (diff) | |
| download | emacs-1971a872f581e842737b8a8a77356ec0130c1a20.tar.gz emacs-1971a872f581e842737b8a8a77356ec0130c1a20.zip | |
(prefer_window_split_horizontally, display_buffer):
Revert 2007-09-08 change.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/window.c | 56 |
2 files changed, 11 insertions, 50 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e23dde386c8..d5a4fbd4a6c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-09-12 Romain Francoise <romain@orebokech.com> | ||
| 2 | |||
| 3 | * window.c (prefer_window_split_horizontally, display_buffer): | ||
| 4 | Revert 2007-09-08 change. | ||
| 5 | |||
| 1 | 2007-09-12 Glenn Morris <rgm@gnu.org> | 6 | 2007-09-12 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * alloca.c: Remove file. | 8 | * alloca.c: Remove file. |
diff --git a/src/window.c b/src/window.c index a34c4200b7f..c05e27de927 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -163,13 +163,6 @@ Lisp_Object Vdisplay_buffer_function; | |||
| 163 | 163 | ||
| 164 | Lisp_Object Veven_window_heights; | 164 | Lisp_Object Veven_window_heights; |
| 165 | 165 | ||
| 166 | /* Non-nil means that windows are split horizontally, i.e. side-by-side, | ||
| 167 | instead of vertically by `display-buffer'. An integer value means that | ||
| 168 | windows may only be split horizontally if the newly created window is at | ||
| 169 | least as wide as that value. */ | ||
| 170 | |||
| 171 | Lisp_Object Vprefer_window_split_horizontally; | ||
| 172 | |||
| 173 | /* List of buffer *names* for buffers that should have their own frames. */ | 166 | /* List of buffer *names* for buffers that should have their own frames. */ |
| 174 | 167 | ||
| 175 | Lisp_Object Vspecial_display_buffer_names; | 168 | Lisp_Object Vspecial_display_buffer_names; |
| @@ -3660,12 +3653,7 @@ the buffer, it may be split, subject to the value of the variable | |||
| 3660 | 3653 | ||
| 3661 | If `even-window-heights' is non-nil, window heights will be evened out | 3654 | If `even-window-heights' is non-nil, window heights will be evened out |
| 3662 | if displaying the buffer causes two vertically adjacent windows to be | 3655 | if displaying the buffer causes two vertically adjacent windows to be |
| 3663 | displayed. | 3656 | displayed. */) |
| 3664 | |||
| 3665 | If `prefer-window-split-horizontally' is non-nil, windows are split | ||
| 3666 | horizontally, i.e. side-by-side, instead of vertically if possible. If the | ||
| 3667 | variable has an integer value, windows may only be split horizontally if the | ||
| 3668 | newly created window is at least as wide as that value. */) | ||
| 3669 | (buffer, not_this_window, frame) | 3657 | (buffer, not_this_window, frame) |
| 3670 | Lisp_Object buffer, not_this_window, frame; | 3658 | Lisp_Object buffer, not_this_window, frame; |
| 3671 | { | 3659 | { |
| @@ -3767,24 +3755,11 @@ newly created window is at least as wide as that value. */) | |||
| 3767 | else | 3755 | else |
| 3768 | window = Fget_largest_window (frames, Qt); | 3756 | window = Fget_largest_window (frames, Qt); |
| 3769 | 3757 | ||
| 3770 | /* If we prefer to split horizontally and the window is wide | 3758 | /* If the largest window is tall enough, full-width, and either eligible |
| 3771 | enough, split it horizontally. */ | 3759 | for splitting or the only window, split it. */ |
| 3772 | if (!NILP (window) | 3760 | if (!NILP (window) |
| 3773 | && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) | 3761 | && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) |
| 3774 | && WINDOW_FULL_WIDTH_P (XWINDOW (window)) | 3762 | && WINDOW_FULL_WIDTH_P (XWINDOW (window)) |
| 3775 | && !NILP (Vprefer_window_split_horizontally) | ||
| 3776 | && (!NUMBERP (Vprefer_window_split_horizontally) || | ||
| 3777 | (window_width(window) >= | ||
| 3778 | 2 * XINT (Vprefer_window_split_horizontally))) | ||
| 3779 | && (window_width(window)) >= (2 * window_min_width)) | ||
| 3780 | { | ||
| 3781 | window = Fsplit_window (window, Qnil, Qt); | ||
| 3782 | } | ||
| 3783 | /* Else, if the largest window is tall enough, full-width, and either | ||
| 3784 | eligible for splitting or the only window, split it. */ | ||
| 3785 | else if (!NILP (window) | ||
| 3786 | && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) | ||
| 3787 | && WINDOW_FULL_WIDTH_P (XWINDOW (window)) | ||
| 3788 | && (window_height (window) >= split_height_threshold | 3763 | && (window_height (window) >= split_height_threshold |
| 3789 | || (NILP (XWINDOW (window)->parent))) | 3764 | || (NILP (XWINDOW (window)->parent))) |
| 3790 | && (window_height (window) | 3765 | && (window_height (window) |
| @@ -3795,27 +3770,16 @@ newly created window is at least as wide as that value. */) | |||
| 3795 | Lisp_Object upper, lower, other; | 3770 | Lisp_Object upper, lower, other; |
| 3796 | 3771 | ||
| 3797 | window = Fget_lru_window (frames, Qt); | 3772 | window = Fget_lru_window (frames, Qt); |
| 3798 | /* If we prefer to split horizontally and the LRU window is | 3773 | /* If the LRU window is tall enough, and either eligible for |
| 3799 | wide enough, split it horizontally. */ | 3774 | splitting and selected or the only window, split it. */ |
| 3800 | if (!NILP (window) | 3775 | if (!NILP (window) |
| 3801 | && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) | 3776 | && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) |
| 3802 | && !NILP (Vprefer_window_split_horizontally) | ||
| 3803 | && window_width(window) >= (2 * window_min_width) | ||
| 3804 | && (!NUMBERP (Vprefer_window_split_horizontally) || | ||
| 3805 | window_width(window) >= | ||
| 3806 | (2 * XINT (Vprefer_window_split_horizontally)))) | ||
| 3807 | window = Fsplit_window (window, Qnil, Qt); | ||
| 3808 | /* Else if the LRU window is tall enough, and either | ||
| 3809 | eligible for splitting and selected, or the only window, | ||
| 3810 | split it. */ | ||
| 3811 | else if (!NILP (window) | ||
| 3812 | && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) | ||
| 3813 | && ((EQ (window, selected_window) | 3777 | && ((EQ (window, selected_window) |
| 3814 | && window_height (window) >= split_height_threshold) | 3778 | && window_height (window) >= split_height_threshold) |
| 3815 | || (NILP (XWINDOW (window)->parent))) | 3779 | || (NILP (XWINDOW (window)->parent))) |
| 3816 | && (window_height (window) | 3780 | && (window_height (window) |
| 3817 | >= (2 * window_min_size_2 (XWINDOW (window), 0)))) | 3781 | >= (2 * window_min_size_2 (XWINDOW (window), 0)))) |
| 3818 | window = Fsplit_window (window, Qnil, Qnil); | 3782 | window = call1 (Vsplit_window_preferred_function, window); |
| 3819 | else | 3783 | else |
| 3820 | window = Fget_lru_window (frames, Qnil); | 3784 | window = Fget_lru_window (frames, Qnil); |
| 3821 | /* If Fget_lru_window returned nil, try other approaches. */ | 3785 | /* If Fget_lru_window returned nil, try other approaches. */ |
| @@ -7390,14 +7354,6 @@ work using this function. */); | |||
| 7390 | If nil, `display-buffer' will leave the window configuration alone. */); | 7354 | If nil, `display-buffer' will leave the window configuration alone. */); |
| 7391 | Veven_window_heights = Qt; | 7355 | Veven_window_heights = Qt; |
| 7392 | 7356 | ||
| 7393 | DEFVAR_LISP ("prefer-window-split-horizontally", &Vprefer_window_split_horizontally, | ||
| 7394 | doc: /* *Non-nil means that windows are split horizontally, i.e. | ||
| 7395 | side-by-side, instead | ||
| 7396 | of vertically by `display-buffer'. | ||
| 7397 | An integer value means that windows may only be split horizontally if the newly | ||
| 7398 | created window is at least as wide as that value. */); | ||
| 7399 | Vprefer_window_split_horizontally = Qnil; | ||
| 7400 | |||
| 7401 | DEFVAR_LISP ("minibuffer-scroll-window", &Vminibuf_scroll_window, | 7357 | DEFVAR_LISP ("minibuffer-scroll-window", &Vminibuf_scroll_window, |
| 7402 | doc: /* Non-nil means it is the window that C-M-v in minibuffer should scroll. */); | 7358 | doc: /* Non-nil means it is the window that C-M-v in minibuffer should scroll. */); |
| 7403 | Vminibuf_scroll_window = Qnil; | 7359 | Vminibuf_scroll_window = Qnil; |