summaryrefslogtreecommitdiff
path: root/devdocs/elisp/terminal-parameters.html
blob: d5eb22c1e963a39cc840c932ced3a1182c574f7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
 <h3 class="section">Terminal Parameters</h3>  <p>Each terminal has a list of associated parameters. These <em>terminal parameters</em> are mostly a convenient way of storage for terminal-local variables, but some terminal parameters have a special meaning. </p> <p>This section describes functions to read and change the parameter values of a terminal. They all accept as their argument either a terminal or a frame; the latter means use that frame’s terminal. An argument of <code>nil</code> means the selected frame’s terminal. </p> <dl> <dt id="terminal-parameters">Function: <strong>terminal-parameters</strong> <em>&amp;optional terminal</em>
</dt> <dd><p>This function returns an alist listing all the parameters of <var>terminal</var> and their values. </p></dd>
</dl> <dl> <dt id="terminal-parameter">Function: <strong>terminal-parameter</strong> <em>terminal parameter</em>
</dt> <dd><p>This function returns the value of the parameter <var>parameter</var> (a symbol) of <var>terminal</var>. If <var>terminal</var> has no setting for <var>parameter</var>, this function returns <code>nil</code>. </p></dd>
</dl> <dl> <dt id="set-terminal-parameter">Function: <strong>set-terminal-parameter</strong> <em>terminal parameter value</em>
</dt> <dd><p>This function sets the parameter <var>parameter</var> of <var>terminal</var> to the specified <var>value</var>, and returns the previous value of that parameter. </p></dd>
</dl> <p>Here’s a list of a few terminal parameters that have a special meaning: </p> <dl compact> <dt><code>background-mode</code></dt> <dd><p>The classification of the terminal’s background color, either <code>light</code> or <code>dark</code>. </p></dd> <dt><code>normal-erase-is-backspace</code></dt> <dd><p>Value is either 1 or 0, depending on whether <code>normal-erase-is-backspace-mode</code> is turned on or off on this terminal. See <a href="https://www.gnu.org/software/emacs/manual/html_node/emacs/DEL-Does-Not-Delete.html#DEL-Does-Not-Delete">DEL Does Not Delete</a> in <cite>The Emacs Manual</cite>. </p></dd> <dt><code>terminal-initted</code></dt> <dd><p>After the terminal is initialized, this is set to the terminal-specific initialization function. </p></dd> <dt><code>tty-mode-set-strings</code></dt> <dd><p>When present, a list of strings containing escape sequences that Emacs will output while configuring a tty for rendering. Emacs emits these strings only when configuring a terminal: if you want to enable a mode on a terminal that is already active (for example, while in <code>tty-setup-hook</code>), explicitly output the necessary escape sequence using <code>send-string-to-terminal</code> in addition to adding the sequence to <code>tty-mode-set-strings</code>. </p></dd> <dt><code>tty-mode-reset-strings</code></dt> <dd><p>When present, a list of strings that undo the effects of the strings in <code>tty-mode-set-strings</code>. Emacs emits these strings when exiting, deleting a terminal, or suspending itself. </p></dd> </dl><div class="_attribution">
  <p class="_attribution-p">
    Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
    <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Terminal-Parameters.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Terminal-Parameters.html</a>
  </p>
</div>