summaryrefslogtreecommitdiff
path: root/devdocs/elisp/overlay-arrow.html
blob: 0d88b259a2c3e5a32a14dbf6557ef5f00029825f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 <h4 class="subsection">The Overlay Arrow</h4> <p>The <em>overlay arrow</em> is useful for directing the user’s attention to a particular line in a buffer. For example, in the modes used for interface to debuggers, the overlay arrow indicates the line of code about to be executed. This feature has nothing to do with <em>overlays</em> (see <a href="overlays">Overlays</a>). </p> <dl> <dt id="overlay-arrow-string">Variable: <strong>overlay-arrow-string</strong>
</dt> <dd><p>This variable holds the string to display to call attention to a particular line, or <code>nil</code> if the arrow feature is not in use. On a graphical display the contents of the string are ignored if the left fringe is shown; instead a glyph is displayed in the fringe area to the left of the display area. </p></dd>
</dl> <dl> <dt id="overlay-arrow-position">Variable: <strong>overlay-arrow-position</strong>
</dt> <dd>
<p>This variable holds a marker that indicates where to display the overlay arrow. It should point at the beginning of a line. On a non-graphical display, or when the left fringe is not shown, the arrow text appears at the beginning of that line, overlaying any text that would otherwise appear. Since the arrow is usually short, and the line usually begins with indentation, normally nothing significant is overwritten. </p> <p>The overlay-arrow string is displayed in any given buffer if the value of <code>overlay-arrow-position</code> in that buffer points into that buffer. Thus, it is possible to display multiple overlay arrow strings by creating buffer-local bindings of <code>overlay-arrow-position</code>. However, it is usually cleaner to use <code>overlay-arrow-variable-list</code> to achieve this result. </p>
</dd>
</dl> <p>You can do a similar job by creating an overlay with a <code>before-string</code> property. See <a href="overlay-properties">Overlay Properties</a>. </p> <p>You can define multiple overlay arrows via the variable <code>overlay-arrow-variable-list</code>. </p> <dl> <dt id="overlay-arrow-variable-list">Variable: <strong>overlay-arrow-variable-list</strong>
</dt> <dd><p>This variable’s value is a list of variables, each of which specifies the position of an overlay arrow. The variable <code>overlay-arrow-position</code> has its normal meaning because it is on this list. </p></dd>
</dl> <p>Each variable on this list can have properties <code>overlay-arrow-string</code> and <code>overlay-arrow-bitmap</code> that specify an overlay arrow string (for text terminals or graphical terminals without the left fringe shown) or fringe bitmap (for graphical terminals with a left fringe) to display at the corresponding overlay arrow position. If either property is not set, the default <code>overlay-arrow-string</code> or <code>overlay-arrow</code> fringe indicator is used. </p><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/Overlay-Arrow.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Overlay-Arrow.html</a>
  </p>
</div>