From: Gerd Moellmann Date: Wed, 6 Dec 2000 13:44:34 +0000 (+0000) Subject: (Veven_window_heights): New variable. X-Git-Tag: emacs-pretest-21.0.93~172 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6529ed87069aceaa8f838b0c174714b43db7d385;p=emacs.git (Veven_window_heights): New variable. (syms_of_window): DEFVAR_LISP it. (Fdisplay_buffer): Check Veven_window_heights before evening the window heights. --- diff --git a/src/ChangeLog b/src/ChangeLog index 1278056121e..875ccc28f8d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -10,6 +10,11 @@ descent are greater than the font's ascent or descent, this means glyphs overlap, which should be handled now by redisplay. + * window.c (Veven_window_heights): New variable. + (syms_of_window): DEFVAR_LISP it. + (Fdisplay_buffer): Check Veven_window_heights before evening the + window heights. + 2000-12-06 Miles Bader * xfaces.c (Finternal_set_lisp_face_attribute): If FRAME is `t', diff --git a/src/window.c b/src/window.c index 2460e00bf5c..903688e2caa 100644 --- a/src/window.c +++ b/src/window.c @@ -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 Vpop_up_frame_function; 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 a frame, search only that frame.\n\ 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 FRAME is nil, search only the selected frame\n\ 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 @@ Commands such as `switch-to-buffer-other-window' and `find-file-other-window'\n\ 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;