Function: dired-pop-to-buffer
dired-pop-to-buffer is a byte-compiled function defined in
dired.el.gz.
This function is obsolete since 24.3; use pop-to-buffer instead.
Signature
(dired-pop-to-buffer BUF)
Documentation
Pop up buffer BUF in a way suitable for Dired.
Probably introduced at or before Emacs version 24.3.
Source Code
;; Defined in /usr/src/emacs/lisp/dired.el.gz
(defun dired-pop-to-buffer (buf)
"Pop up buffer BUF in a way suitable for Dired."
(declare (obsolete pop-to-buffer "24.3"))
(let ((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))))
pop-up-frames)
(pop-to-buffer (get-buffer-create buf)))
;; See Bug#12281.
(set-window-start nil (point-min))
;; If dired-shrink-to-fit is t, make its window fit its contents.
(when dired-shrink-to-fit
;; Try to not delete window when we want to display less than
;; `window-min-height' lines.
(fit-window-to-buffer (get-buffer-window buf) nil 1 nil nil t)))