Subject: bug#9873: 24.0.90; dired - window changes size when trying to delete more than one file

From: Juri Linkov <[email-masked]>
Date: Thu, 03 Nov 2011 21:42:41 +0200

>> +	pop-up-frames)
>
> There should be no need to bind this to nil.

I agree it's unnecessary.  Below is a new patch without `pop-up-frames':

=== modified file 'lisp/window.el'
--- lisp/window.el	2011-11-02 09:39:18 +0000
+++ lisp/window.el	2011-11-03 19:34:58 +0000
@@ -4853,6 +4853,23 @@ (defun display-buffer-pop-up-window (buf
       (set-window-prev-buffers window nil)
       window)))
 
+(defun display-buffer-pop-up-window-below (buffer alist)
+  "Display BUFFER by popping up a new window below the selected window."
+  (let (
+	;; Stay within the confines of the initial window.
+	;; Don't resize other windows.  (Bug#1806 Bug#9873)
+	(window-nest t)
+	(split-window-preferred-function
+	 (lambda (window)
+	   (or (and (let ((split-height-threshold 0))
+		      (window-splittable-p (selected-window)))
+		    ;; Try to split the selected window vertically if
+		    ;; that's possible.  (Bug#1806)
+		    (split-window-below))
+	       ;; Otherwise, try to split WINDOW sensibly.
+	       (split-window-sensibly window)))))
+    (display-buffer-pop-up-window buffer alist)))
+
 (defun display-buffer--maybe-pop-up-frame-or-window (buffer alist)
   "Try displaying BUFFER based on `pop-up-frames' or `pop-up-windows'.