diff options
| author | Gerd Moellmann | 1999-08-25 21:12:40 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 1999-08-25 21:12:40 +0000 |
| commit | 97cafc0f48a1e7a7409ebcd45875d79e4f3d8649 (patch) | |
| tree | 889325700cb0e9a81e9b02c33c6a8ebecd1604f7 /src | |
| parent | 527b6458ed31b7844ce5fa6260a9e43e184700c8 (diff) | |
| download | emacs-97cafc0f48a1e7a7409ebcd45875d79e4f3d8649.tar.gz emacs-97cafc0f48a1e7a7409ebcd45875d79e4f3d8649.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 11eee2353b0..834b679e84f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -5428,6 +5428,10 @@ resize_mini_window (w) | |||
| 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 | { |
| @@ -5445,6 +5449,8 @@ resize_mini_window (w) | |||
| 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); |
| @@ -12727,7 +12733,8 @@ displayed according to the current fontset."); | |||
| 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 | ||