Dear developers, attached find a patch for dispnew.c, window.h, and window.c which tries to fix some problems wrt window resizing. Please tell me whether it applies and whether you can build Emacs with it (I currently cannot do that with the most recent development sources). In addition please try to answer the following questions (the two functions at the bottom might be useful for these tests): (1) Maximize a frame, create some minimal windows (one-line, two-columns) in it, and demaximize the frame. Are all windows preserved? (2) Same as (1) but try to create a no-way-out configuration where demaximizing the frame cannot avoid deleting some window(s) - for example, because you have two side-by-side windows and the demaximized frame can accomodate at most one such window. Does resizing behave reasonably? (3) Save the window-configurations of (1) and (2) in a maximized frame, demaximize the frame, change the layout arbitrarily, and set the window configuration to the saved one. Does the resulting configuration appear reasonable? (4) Split some window vertically, and repeatedly apply `my-enlarge-window'. Is the other window deleted when its height drops below `window-min-height'? Does it for other (possibly invalid) values of `window-min-height'? (5) Split some window horizontally, and repeatedly apply `my-enlarge-window-horizontally'. Is the other window deleted when its width drops below `window-min-width'? Does it for other (possibly invalid) values of `window-min-width'? (6) Create a one-line window at the bottom of the frame and try to resize the minibuffer. Is the one-line window's modeline retained? (7) After all these tests: Does customizing `window-min-height' and `window-min-width' work as expected? Some of these issues were more or less broken in Emacsen I built over the previous months. Please help me to eliminate these problems. Pretty please. (defun my-enlarge-window () (interactive) (let ((window-min-height 1)) (enlarge-window 1))) (defun my-enlarge-window-horizontally () (interactive) (let ((window-min-width 2)) (enlarge-window 1 t)))