Function: frame-initial-p
frame-initial-p is a function defined in terminal.c.
Signature
(frame-initial-p &optional FRAME)
Documentation
Return non-nil if FRAME is the initial frame.
That is, the initial text frame used internally during daemon mode, batch mode, and the early stages of startup. If FRAME is a terminal object, return non-nil if it holds the initial frame. FRAME defaults to the selected frame.
Probably introduced at or before Emacs version 31.1.
Source Code
// Defined in /usr/src/emacs/src/terminal.c
{
if (NILP (frame))
frame = selected_frame;
if (FRAMEP (frame))
{
struct frame *f = XFRAME (frame);
return FRAME_LIVE_P (f) && FRAME_INITIAL_P (f) ? Qt : Qnil;
}
struct terminal *t = decode_terminal (frame);
return t && t->type == output_initial ? Qt : Qnil;
}