changeset 34261:c50a8c8171b7

(Veven_window_heights): New variable. (syms_of_window): DEFVAR_LISP it. (Fdisplay_buffer): Check Veven_window_heights before evening the window heights.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 06 Dec 2000 13:44:12 +0000
parents b4bcb9d9875a
children ac3e46ed914a
files src/window.c
diffstat 1 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Wed Dec 06 13:43:00 2000 +0000
+++ b/src/window.c	Wed Dec 06 13:44:12 2000 +0000
@@ -1,6 +1,7 @@
 /* Window creation, deletion and examination for GNU Emacs.
    Does not include redisplay.
-   Copyright (C) 1985,86,87,93,94,95,96,97,1998,2000 Free Software Foundation, Inc.
+   Copyright (C) 1985,86,87,93,94,95,96,97,1998,2000
+   Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -142,6 +143,10 @@
 
 Lisp_Object Vdisplay_buffer_function;
 
+/* Non-nil means that Fdisplay_buffer should even the heights of windows.  */
+
+Lisp_Object Veven_window_heights;
+
 /* List of buffer *names* for buffers that should have their own frames.  */
 
 Lisp_Object Vspecial_display_buffer_names;
@@ -2843,7 +2848,11 @@
 If FRAME is nil, search only the selected frame\n\
  (actually the last nonminibuffer frame),\n\
  unless `pop-up-frames' or `display-buffer-reuse-frames' is non-nil,\n\
- which means search visible and iconified frames.")
+ which means search visible and iconified frames.\n\
+\n\
+If `even-window-heights' is non-nil, window heights will be evened out\n\
+if displaying the buffer causes two vertically\ adjacent windows to be\n\
+displayed.")
   (buffer, not_this_window, frame)
      register Lisp_Object buffer, not_this_window, frame;
 {
@@ -2992,6 +3001,7 @@
 	  if (!NILP (XWINDOW (window)->next))
 	    other = lower = XWINDOW (window)->next, upper = window;
 	  if (!NILP (other)
+	      && !NILP (Veven_window_heights)
 	      /* Check that OTHER and WINDOW are vertically arrayed.  */
 	      && !EQ (XWINDOW (other)->top, XWINDOW (window)->top)
 	      && (XFASTINT (XWINDOW (other)->height)
@@ -5491,6 +5501,11 @@
 work using this function.");
   Vdisplay_buffer_function = Qnil;
 
+  DEFVAR_LISP ("even-window-heights", &Veven_window_heights,
+    "*If non-nil, `display-buffer' should even the window heights.\n\
+If nil, `display-buffer' will leave the window configuation alone.");
+  Veven_window_heights = Qt;
+
   DEFVAR_LISP ("minibuffer-scroll-window", &Vminibuf_scroll_window,
     "Non-nil means it is the window that C-M-v in minibuffer should scroll.");
   Vminibuf_scroll_window = Qnil;