summaryrefslogtreecommitdiff
path: root/devdocs/elisp/beeping.html
blob: ed825b06c232c0d2b9e393e4bdc704b9df6a0515 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 <h3 class="section">Beeping</h3>  <p>This section describes how to make Emacs ring the bell (or blink the screen) to attract the user’s attention. Be conservative about how often you do this; frequent bells can become irritating. Also be careful not to use just beeping when signaling an error is more appropriate (see <a href="errors">Errors</a>). </p> <dl> <dt id="ding">Function: <strong>ding</strong> <em>&amp;optional do-not-terminate</em>
</dt> <dd>
 <p>This function beeps, or flashes the screen (see <code>visible-bell</code> below). It also terminates any keyboard macro currently executing unless <var>do-not-terminate</var> is non-<code>nil</code>. </p>
</dd>
</dl> <dl> <dt id="beep">Function: <strong>beep</strong> <em>&amp;optional do-not-terminate</em>
</dt> <dd><p>This is a synonym for <code>ding</code>. </p></dd>
</dl> <dl> <dt id="visible-bell">User Option: <strong>visible-bell</strong>
</dt> <dd><p>This variable determines whether Emacs should flash the screen to represent a bell. Non-<code>nil</code> means yes, <code>nil</code> means no. This is effective on graphical displays, and on text terminals provided the terminal’s Termcap entry defines the visible bell capability (‘<samp>vb</samp>’). </p></dd>
</dl> <dl> <dt id="ring-bell-function">User Option: <strong>ring-bell-function</strong>
</dt> <dd><p>If this is non-<code>nil</code>, it specifies how Emacs should ring the bell. Its value should be a function of no arguments. If this is non-<code>nil</code>, it takes precedence over the <code>visible-bell</code> variable. </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/Beeping.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Beeping.html</a>
  </p>
</div>