dframe-current-frame

dframe-current-frame is a compiled Lisp function in `dframe.el'.

(dframe-current-frame FRAME-VAR DESIRED-MAJOR-MODE)

Return the existing dedicated frame to use.
FRAME-VAR is the variable storing the currently active dedicated frame.
If the current frame's buffer uses DESIRED-MAJOR-MODE, then use that frame.