comparison src/xdisp.c @ 25403:5a3db5249db9

(resize_mini_window): Don't resize if Vmax_mini_window_height is nil. Otherwise, use a default if Vmax_mini_window_height is not ot a number. (syms_of_xdisp): Extend documentation of Vmax_mini_window_height.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 25 Aug 1999 21:12:40 +0000
parents ed9fe1a2c8ae
children 255017b70168
comparison
equal deleted inserted replaced
25402:857e8b5b1194 25403:5a3db5249db9
5426 { 5426 {
5427 struct frame *f = XFRAME (w->frame); 5427 struct frame *f = XFRAME (w->frame);
5428 int window_height_changed_p = 0; 5428 int window_height_changed_p = 0;
5429 5429
5430 xassert (MINI_WINDOW_P (w)); 5430 xassert (MINI_WINDOW_P (w));
5431
5432 /* Nil means don't try to resize. */
5433 if (NILP (Vmax_mini_window_height))
5434 return 0;
5431 5435
5432 if (!FRAME_MINIBUF_ONLY_P (f)) 5436 if (!FRAME_MINIBUF_ONLY_P (f))
5433 { 5437 {
5434 struct it it; 5438 struct it it;
5435 struct window *root = XWINDOW (FRAME_ROOT_WINDOW (f)); 5439 struct window *root = XWINDOW (FRAME_ROOT_WINDOW (f));
5443 /* Compute the max. number of lines specified by the user. */ 5447 /* Compute the max. number of lines specified by the user. */
5444 if (FLOATP (Vmax_mini_window_height)) 5448 if (FLOATP (Vmax_mini_window_height))
5445 max_height = XFLOATINT (Vmax_mini_window_height) * total_height; 5449 max_height = XFLOATINT (Vmax_mini_window_height) * total_height;
5446 else if (INTEGERP (Vmax_mini_window_height)) 5450 else if (INTEGERP (Vmax_mini_window_height))
5447 max_height = XINT (Vmax_mini_window_height); 5451 max_height = XINT (Vmax_mini_window_height);
5452 else
5453 max_height = total_height / 4;
5448 5454
5449 /* Correct that max. height if it's bogus. */ 5455 /* Correct that max. height if it's bogus. */
5450 max_height = max (1, max_height); 5456 max_height = max (1, max_height);
5451 max_height = min (total_height, max_height); 5457 max_height = min (total_height, max_height);
5452 5458
12725 unibyte_display_via_language_environment = 0; 12731 unibyte_display_via_language_environment = 0;
12726 12732
12727 DEFVAR_LISP ("max-mini-window-height", &Vmax_mini_window_height, 12733 DEFVAR_LISP ("max-mini-window-height", &Vmax_mini_window_height,
12728 "*Maximum height for resizing mini-windows.\n\ 12734 "*Maximum height for resizing mini-windows.\n\
12729 If a float, it specifies a fraction of the mini-window frame's height.\n\ 12735 If a float, it specifies a fraction of the mini-window frame's height.\n\
12730 If an integer, it specifies a number of lines."); 12736 If an integer, it specifies a number of lines.\n\
12737 If nil, don't resize.");
12731 Vmax_mini_window_height = make_float (0.25); 12738 Vmax_mini_window_height = make_float (0.25);
12732 } 12739 }
12733 12740
12734 12741
12735 /* Initialize this module when Emacs starts. */ 12742 /* Initialize this module when Emacs starts. */