diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/fringe-bitmaps.html | |
new repository
Diffstat (limited to 'devdocs/elisp/fringe-bitmaps.html')
| -rw-r--r-- | devdocs/elisp/fringe-bitmaps.html | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/devdocs/elisp/fringe-bitmaps.html b/devdocs/elisp/fringe-bitmaps.html new file mode 100644 index 00000000..6f144806 --- /dev/null +++ b/devdocs/elisp/fringe-bitmaps.html @@ -0,0 +1,45 @@ + <h4 class="subsection">Fringe Bitmaps</h4> <p>The <em>fringe bitmaps</em> are the actual bitmaps which represent the logical fringe indicators for truncated or continued lines, buffer boundaries, overlay arrows, etc. Each bitmap is represented by a symbol. These symbols are referred to by the variable <code>fringe-indicator-alist</code>, which maps fringe indicators to bitmaps (see <a href="fringe-indicators">Fringe Indicators</a>), and the variable <code>fringe-cursor-alist</code>, which maps fringe cursors to bitmaps (see <a href="fringe-cursors">Fringe Cursors</a>). </p> <p>Lisp programs can also directly display a bitmap in the left or right fringe, by using a <code>display</code> property for one of the characters appearing in the line (see <a href="other-display-specs">Other Display Specs</a>). Such a display specification has the form </p> <div class="example"> <pre class="example">(<var>fringe</var> <var>bitmap</var> [<var>face</var>]) +</pre> +</div> <p><var>fringe</var> is either the symbol <code>left-fringe</code> or <code>right-fringe</code>. <var>bitmap</var> is a symbol identifying the bitmap to display. The optional <var>face</var> names a face whose foreground and background colors are to be used to display the bitmap, using the attributes of the <code>fringe</code> face for colors that <var>face</var> didn’t specify. If <var>face</var> is omitted, that means to use the attributes of the <code>default</code> face for the colors which the <code>fringe</code> face didn’t specify. For predictable results that don’t depend on the attributes of the <code>default</code> and <code>fringe</code> faces, we recommend you never omit <var>face</var>, but always provide a specific face. In particular, if you want the bitmap to be always displayed in the <code>fringe</code> face, use <code>fringe</code> as <var>face</var>. </p> <p>For instance, to display an arrow in the left fringe, using the <code>warning</code> face, you could say something like: </p> <div class="lisp"> <pre class="lisp">(overlay-put + (make-overlay (point) (point)) + 'before-string (propertize + "x" 'display + `(left-fringe right-arrow warning))) +</pre> +</div> <p>Here is a list of the standard fringe bitmaps defined in Emacs, and how they are currently used in Emacs (via <code>fringe-indicator-alist</code> and <code>fringe-cursor-alist</code>): </p> <dl compact> <dt> +<code>left-arrow</code>, <code>right-arrow</code> +</dt> <dd> +<p>Used to indicate truncated lines. </p> </dd> <dt> +<code>left-curly-arrow</code>, <code>right-curly-arrow</code> +</dt> <dd> +<p>Used to indicate continued lines. </p> </dd> <dt> +<code>right-triangle</code>, <code>left-triangle</code> +</dt> <dd> +<p>The former is used by overlay arrows. The latter is unused. </p> </dd> <dt> +<code>up-arrow</code>, <code>down-arrow</code> +</dt> <dt> +<code>bottom-left-angle</code>, <code>bottom-right-angle</code> +</dt> <dt> +<code>top-left-angle</code>, <code>top-right-angle</code> +</dt> <dt> +<code>left-bracket</code>, <code>right-bracket</code> +</dt> <dt><code>empty-line</code></dt> <dd> +<p>Used to indicate buffer boundaries. </p> </dd> <dt> +<code>filled-rectangle</code>, <code>hollow-rectangle</code> +</dt> <dt> +<code>filled-square</code>, <code>hollow-square</code> +</dt> <dt> +<code>vertical-bar</code>, <code>horizontal-bar</code> +</dt> <dd> +<p>Used for different types of fringe cursors. </p> </dd> <dt> +<code>exclamation-mark</code>, <code>question-mark</code> +</dt> <dd><p>Not used by core Emacs features. </p></dd> </dl> <p>The next subsection describes how to define your own fringe bitmaps. </p> <dl> <dt id="fringe-bitmaps-at-pos">Function: <strong>fringe-bitmaps-at-pos</strong> <em>&optional pos window</em> +</dt> <dd> +<p>This function returns the fringe bitmaps of the display line containing position <var>pos</var> in window <var>window</var>. The return value has the form <code>(<var>left</var> <var>right</var> <var>ov</var>)</code>, where <var>left</var> is the symbol for the fringe bitmap in the left fringe (or <code>nil</code> if no bitmap), <var>right</var> is similar for the right fringe, and <var>ov</var> is non-<code>nil</code> if there is an overlay arrow in the left fringe. </p> <p>The value is <code>nil</code> if <var>pos</var> is not visible in <var>window</var>. If <var>window</var> is <code>nil</code>, that stands for the selected window. If <var>pos</var> is <code>nil</code>, that stands for the value of point in <var>window</var>. </p> +</dd> +</dl><div class="_attribution"> + <p class="_attribution-p"> + Copyright © 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/Fringe-Bitmaps.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Fringe-Bitmaps.html</a> + </p> +</div> |
