summaryrefslogtreecommitdiff
path: root/devdocs/elisp/glyphless-chars.html
diff options
context:
space:
mode:
Diffstat (limited to 'devdocs/elisp/glyphless-chars.html')
-rw-r--r--devdocs/elisp/glyphless-chars.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/devdocs/elisp/glyphless-chars.html b/devdocs/elisp/glyphless-chars.html
new file mode 100644
index 00000000..4e307a7b
--- /dev/null
+++ b/devdocs/elisp/glyphless-chars.html
@@ -0,0 +1,26 @@
+ <h4 class="subsection">Glyphless Character Display</h4> <p><em>Glyphless characters</em> are characters which are displayed in a special way, e.g., as a box containing a hexadecimal code, instead of being displayed literally. These include characters which are explicitly defined to be glyphless, as well as characters for which there is no available font (on a graphical display), and characters which cannot be encoded by the terminal’s coding system (on a text terminal). </p> <dl> <dt id="glyphless-char-display">Variable: <strong>glyphless-char-display</strong>
+</dt> <dd>
+<p>The value of this variable is a char-table which defines glyphless characters and how they are displayed. Each entry must be one of the following display methods: </p> <dl compact> <dt><code>nil</code></dt> <dd>
+<p>Display the character in the usual way. </p> </dd> <dt><code>zero-width</code></dt> <dd>
+<p>Don’t display the character. </p> </dd> <dt><code>thin-space</code></dt> <dd>
+<p>Display a thin space, 1-pixel wide on graphical displays, or 1-character wide on text terminals. </p> </dd> <dt><code>empty-box</code></dt> <dd>
+<p>Display an empty box. </p> </dd> <dt><code>hex-code</code></dt> <dd>
+<p>Display a box containing the Unicode codepoint of the character, in hexadecimal notation. </p> </dd> <dt>an <acronym>ASCII</acronym> string</dt> <dd>
+<p>Display a box containing that string. The string should contain at most 6 <acronym>ASCII</acronym> characters. </p> </dd> <dt>a cons cell <code>(<var>graphical</var> . <var>text</var>)</code>
+</dt> <dd><p>Display with <var>graphical</var> on graphical displays, and with <var>text</var> on text terminals. Both <var>graphical</var> and <var>text</var> must be one of the display methods described above. </p></dd> </dl> <p>The <code>thin-space</code>, <code>empty-box</code>, <code>hex-code</code>, and <acronym>ASCII</acronym> string display methods are drawn with the <code>glyphless-char</code> face. On text terminals, a box is emulated by square brackets, ‘<samp>[]</samp>’. </p> <p>The char-table has one extra slot, which determines how to display any character that cannot be displayed with any available font, or cannot be encoded by the terminal’s coding system. Its value should be one of the above display methods, except <code>zero-width</code> or a cons cell. </p> <p>If a character has a non-<code>nil</code> entry in an active display table, the display table takes effect; in this case, Emacs does not consult <code>glyphless-char-display</code> at all. </p>
+</dd>
+</dl> <dl> <dt id="glyphless-char-display-control">User Option: <strong>glyphless-char-display-control</strong>
+</dt> <dd>
+<p>This user option provides a convenient way to set <code>glyphless-char-display</code> for groups of similar characters. Do not set its value directly from Lisp code; the value takes effect only via a custom <code>:set</code> function (see <a href="variable-definitions">Variable Definitions</a>), which updates <code>glyphless-char-display</code>. </p> <p>Its value should be an alist of elements <code>(<var>group</var>
+. <var>method</var>)</code>, where <var>group</var> is a symbol specifying a group of characters, and <var>method</var> is a symbol specifying how to display them. </p> <p><var>group</var> should be one of the following: </p> <dl compact> <dt><code>c0-control</code></dt> <dd>
+<p><acronym>ASCII</acronym> control characters <code>U+0000</code> to <code>U+001F</code>, excluding the newline and tab characters (normally displayed as escape sequences like ‘<samp>^A</samp>’; see <a href="https://www.gnu.org/software/emacs/manual/html_node/emacs/Text-Display.html#Text-Display">How Text Is Displayed</a> in <cite>The GNU Emacs Manual</cite>). </p> </dd> <dt><code>c1-control</code></dt> <dd>
+<p>Non-<acronym>ASCII</acronym>, non-printing characters <code>U+0080</code> to <code>U+009F</code> (normally displayed as octal escape sequences like ‘<samp>\230</samp>’). </p> </dd> <dt><code>format-control</code></dt> <dd>
+<p>Characters of Unicode General Category [Cf], such as U+200E <small>LEFT-TO-RIGHT MARK</small>, but excluding characters that have graphic images, such as U+00AD <small>SOFT HYPHEN</small>. </p> </dd> <dt><code>variation-selectors</code></dt> <dd>
+<p>Unicode VS-1 through VS-16 (U+FE00 through U+FE0F), which are used to select between different glyphs for the same codepoints (typically emojis). </p> </dd> <dt><code>no-font</code></dt> <dd><p>Characters for which there is no suitable font, or which cannot be encoded by the terminal’s coding system, or those for which the text-mode terminal has no glyphs. </p></dd> </dl> <p>The <var>method</var> symbol should be one of <code>zero-width</code>, <code>thin-space</code>, <code>empty-box</code>, or <code>hex-code</code>. These have the same meanings as in <code>glyphless-char-display</code>, above. </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/Glyphless-Chars.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Glyphless-Chars.html</a>
+ </p>
+</div>