pop-up-frame-function

pop-up-frame-function is a variable defined in `window.el'.
Its value is
(lambda nil (make-frame pop-up-frame-alist))

  • This variable may be risky if used as a file-local variable.

Documentation:
Function used by `display-buffer' for creating a new frame.
This function is called with no arguments and should return a new
frame. The default value calls `make-frame' with the argument
`pop-up-frame-alist'.

You can customize this variable.