diff options
| author | Glenn Morris | 2018-02-13 09:26:20 -0800 |
|---|---|---|
| committer | Glenn Morris | 2018-02-13 09:26:20 -0800 |
| commit | 98f4e336e879e54251694fa0d47b69d8d325176d (patch) | |
| tree | b623c340b850debd5f2e907287f3c48735202aad /src | |
| parent | 1d135af78c3ddd502b5feb84884ea55cbc664753 (diff) | |
| parent | 333d6f4d99a80f30ae6cd3880b9d9ec38a85691b (diff) | |
| download | emacs-98f4e336e879e54251694fa0d47b69d8d325176d.tar.gz emacs-98f4e336e879e54251694fa0d47b69d8d325176d.zip | |
Merge from origin/emacs-26
333d6f4 (origin/emacs-26) More changes in the Emacs manual
52ca0d1 * lisp/vc/vc.el (vc-deduce-backend): Use ignore-errors.
69e8046 Don't signal error in vc-deduce-backend
f568c91 * doc/misc/tramp.texi: Index more user options.
92ca881 Minor change in the Emacs manual
e055a12 NEWS update about 'string-trim'
96b6e24 Clarify TRAMP process-environment interaction (Bug#30419)
4fa467e * lisp/progmodes/grep.el (grep-num-matches-found): New variable.
a22820a Avoid aborts in cm.c due to too small TTY frame
26f6441 Another set of improvements in the Emacs manual
cef3b42 Fix help in mode-line-mode-menu
f8a493c Improve documentation of desktop restoring
10637af Improve the Emacs manual's chapter "Frames"
d924953 Fix unbound mm-uu-entry in mm-uu
cb2487b Improve Emacs user manual in fixit.texi
66e9527 Another minor change in the manual
6a1c03d More minor changes in the Emacs manual
32fb8c4 Avoid printing garbled error message from image.el
Conflicts:
etc/NEWS
lisp/image.el
Diffstat (limited to 'src')
| -rw-r--r-- | src/frame.c | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/src/frame.c b/src/frame.c index 9b560808128..9eac242ea3f 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -342,7 +342,9 @@ DEFUN ("frame-windows-min-size", Fframe_windows_min_size, | |||
| 342 | * of `window-min-height' (`window-min-width' if HORIZONTAL is non-nil). | 342 | * of `window-min-height' (`window-min-width' if HORIZONTAL is non-nil). |
| 343 | * With IGNORE non-nil the values of these variables are ignored. | 343 | * With IGNORE non-nil the values of these variables are ignored. |
| 344 | * | 344 | * |
| 345 | * In either case, never return a value less than 1. | 345 | * In either case, never return a value less than 1. For TTY frames, |
| 346 | * additionally limit the minimum frame height to a value large enough | ||
| 347 | * to support the menu bar, the mode line, and the echo area. | ||
| 346 | */ | 348 | */ |
| 347 | static int | 349 | static int |
| 348 | frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, | 350 | frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, |
| @@ -350,6 +352,7 @@ frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, | |||
| 350 | { | 352 | { |
| 351 | struct frame *f = XFRAME (frame); | 353 | struct frame *f = XFRAME (frame); |
| 352 | Lisp_Object par_size; | 354 | Lisp_Object par_size; |
| 355 | int retval; | ||
| 353 | 356 | ||
| 354 | if ((!NILP (horizontal) | 357 | if ((!NILP (horizontal) |
| 355 | && NUMBERP (par_size = get_frame_param (f, Qmin_width))) | 358 | && NUMBERP (par_size = get_frame_param (f, Qmin_width))) |
| @@ -362,15 +365,27 @@ frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, | |||
| 362 | if (min_size < 1) | 365 | if (min_size < 1) |
| 363 | min_size = 1; | 366 | min_size = 1; |
| 364 | 367 | ||
| 365 | return (NILP (pixelwise) | 368 | retval = (NILP (pixelwise) |
| 366 | ? min_size | 369 | ? min_size |
| 367 | : min_size * (NILP (horizontal) | 370 | : min_size * (NILP (horizontal) |
| 368 | ? FRAME_LINE_HEIGHT (f) | 371 | ? FRAME_LINE_HEIGHT (f) |
| 369 | : FRAME_COLUMN_WIDTH (f))); | 372 | : FRAME_COLUMN_WIDTH (f))); |
| 370 | } | 373 | } |
| 371 | else | 374 | else |
| 372 | return XINT (call4 (Qframe_windows_min_size, frame, horizontal, | 375 | retval = XINT (call4 (Qframe_windows_min_size, frame, horizontal, |
| 373 | ignore, pixelwise)); | 376 | ignore, pixelwise)); |
| 377 | /* Don't allow too small height of text-mode frames, or else cm.c | ||
| 378 | might abort in cmcheckmagic. */ | ||
| 379 | if ((FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) && NILP (horizontal)) | ||
| 380 | { | ||
| 381 | int min_height = (FRAME_MENU_BAR_LINES (f) | ||
| 382 | + FRAME_WANTS_MODELINE_P (f) | ||
| 383 | + 2); /* one text line and one echo-area line */ | ||
| 384 | if (retval < min_height) | ||
| 385 | retval = min_height; | ||
| 386 | } | ||
| 387 | |||
| 388 | return retval; | ||
| 374 | } | 389 | } |
| 375 | 390 | ||
| 376 | 391 | ||