Function: display-buffer-pop-up-frame
display-buffer-pop-up-frame is a byte-compiled function defined in
window.el.gz.
Signature
(display-buffer-pop-up-frame BUFFER ALIST)
Documentation
Display BUFFER in a new frame.
This works by calling pop-up-frame-function. If successful,
return the window used; otherwise return nil.
ALIST is an association list of action symbols and values. See Info node (elisp) Buffer Display Action Alists for details of such alists.
If ALIST has a non-nil inhibit-switch-frame entry, avoid
raising the new frame. A non-nil pop-up-frame-parameters entry
specifies an alist of frame parameters to give the new frame.
This is an action function for buffer display, see Info
node (elisp) Buffer Display Action Functions. It should be
called only by display-buffer or a function directly or
indirectly called by the latter.
Source Code
;; Defined in /usr/src/emacs/lisp/window.el.gz
(defun display-buffer-pop-up-frame (buffer alist)
"Display BUFFER in a new frame.
This works by calling `pop-up-frame-function'. If successful,
return the window used; otherwise return nil.
ALIST is an association list of action symbols and values. See
Info node `(elisp) Buffer Display Action Alists' for details of
such alists.
If ALIST has a non-nil `inhibit-switch-frame' entry, avoid
raising the new frame. A non-nil `pop-up-frame-parameters' entry
specifies an alist of frame parameters to give the new frame.
This is an action function for buffer display, see Info
node `(elisp) Buffer Display Action Functions'. It should be
called only by `display-buffer' or a function directly or
indirectly called by the latter."
(let* ((params (cdr (assq 'pop-up-frame-parameters alist)))
(pop-up-frame-alist (append params pop-up-frame-alist))
(fun pop-up-frame-function)
frame window)
(when (and fun
;; Make BUFFER current so `make-frame' will use it as the
;; new frame's buffer (Bug#15133).
(with-current-buffer buffer
(setq frame (funcall fun)))
(setq window (frame-selected-window frame)))
(prog1 (window--display-buffer buffer window 'frame alist)
(unless (cdr (assq 'inhibit-switch-frame alist))
(window--maybe-raise-frame frame))))))