Function: controlling-tty-p

controlling-tty-p is a function defined in term.c.

Signature

(controlling-tty-p &optional TERMINAL)

Documentation

Return non-nil if TERMINAL is the controlling tty of the Emacs process.

TERMINAL can be a terminal object, a frame, or nil (meaning the selected frame's terminal). This function always returns nil if TERMINAL is not on a tty device.

View in manual

Source Code

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

  return (t && !strcmp (t->display_info.tty->name, dev_tty) ? Qt : Qnil);
}