Function: terminal-live-p

terminal-live-p is a function defined in terminal.c.

Signature

(terminal-live-p OBJECT)

Documentation

Return non-nil if OBJECT is a terminal which has not been deleted.

Return nil if OBJECT is not a live display terminal. OBJECT may be a terminal object, a frame, or nil (meaning the selected frame's terminal). If OBJECT is a live display terminal, return what sort of output terminal it uses. See the documentation of framep for possible return values.

View in manual

Source Code

// Defined in /usr/src/emacs/src/terminal.c
{
  struct terminal *t = decode_terminal (object);

  if (!t)
    return Qnil;

  switch (t->type)
    {
    case output_initial: /* The initial frame is like a termcap frame. */
    case output_termcap:
      return Qt;
    case output_x_window:
      return Qx;
    case output_w32:
      return Qw32;
    case output_msdos_raw:
      return Qpc;
    case output_ns:
      return Qns;
    case output_pgtk:
      return Qpgtk;
    case output_haiku:
      return Qhaiku;
    case output_android:
      return Qandroid;
    default:
      emacs_abort ();
    }
}