Function: terminal-name
terminal-name is a function defined in terminal.c.
Signature
(terminal-name &optional TERMINAL)
Documentation
Return the name of the terminal device TERMINAL.
It is not guaranteed that the returned value is unique among opened devices.
TERMINAL may be a terminal object, a frame, or nil (meaning the selected frame's terminal).
Source Code
// Defined in /usr/src/emacs/src/terminal.c
{
struct terminal *t = decode_live_terminal (terminal);
return t->name ? build_string (t->name) : Qnil;
}