@item an @acronym{ASCII} string
Display a box containing that string. The string should contain at
-most 6 @acronym{ASCII} characters.
+most 6 @acronym{ASCII} characters. As an exception, if the string
+includes just one character, on text-mode terminals that character
+will be displayed without a box; this allows to handle such
+``acronyms'' as a replacement character for characters that cannot be
+displayed by the terminal.
@item a cons cell @code{(@var{graphical} . @var{text})}
Display with @var{graphical} on graphical displays, and with
*** Changes for values 'no' and 'no-ding' of 'isearch-wrap-pause'.
Now with these values the search will wrap around not only on repeating
with 'C-s C-s', but also after typing a character.
-
+1
+++
*** New user option 'char-fold-override'.
Non-nil means that the default definitions of equivalent characters
face" or "heart with arrow"), like 'C-x 8 e e', with minibuffer
completion, and adds the Emoji into the search string.
+** Glyphless characters
+
+++
-** New minor mode 'glyphless-display-mode'.
+*** New minor mode 'glyphless-display-mode'.
This allows an easy way to toggle seeing all glyphless characters in
the current buffer.
+*** The extra slot of 'glyphless-char-display' can now have cons values.
+The extra slot of the 'glyphless-char-display' char-table can now have
+values that are cons cells, specifying separate values for text-mode
+and GUI terminals.
+
+*** "Replacement character" feature for undisplayable characters on TTYs.
+The 'acronym' method of displaying glyphless characters on text-mode
+frames treats single-character acronyms specially: they are displayed
+without the surrounding [..] "box", thus in effect treating such
+"acronyms" as replacement characters.
+
** Registers
+++
:group 'help)
(defface glyphless-char
- '((((type tty)) :inherit underline)
+ '((((type tty)) :inherit escape-glyph :underline t)
(((type pc)) :inherit escape-glyph)
(t :height 0.6))
"Face for displaying non-graphic characters (e.g. U+202A (LRE)).
? CHAR_TABLE_REF (Vglyphless_char_display,
glyph->u.glyphless.ch)
: XCHAR_TABLE (Vglyphless_char_display)->extras[0]);
+ if (CONSP (acronym))
+ acronym = XCAR (acronym);
if (STRINGP (acronym))
str = SSDATA (acronym);
}
? CHAR_TABLE_REF (Vglyphless_char_display,
glyph->u.glyphless.ch)
: XCHAR_TABLE (Vglyphless_char_display)->extras[0]);
+ if (CONSP (acronym))
+ acronym = XCAR (acronym);
if (STRINGP (acronym))
str = SSDATA (acronym);
}
? CHAR_TABLE_REF (Vglyphless_char_display,
glyph->u.glyphless.ch)
: XCHAR_TABLE (Vglyphless_char_display)->extras[0]);
+ if (CONSP (acronym))
+ acronym = XCAR (acronym);
if (STRINGP (acronym))
str = SSDATA (acronym);
}
acronym = CHAR_TABLE_REF (Vglyphless_char_display, it->c);
if (CONSP (acronym))
acronym = XCDR (acronym);
- buf[0] = '[';
str = STRINGP (acronym) ? SSDATA (acronym) : "";
- for (len = 0; len < 6 && str[len] && ASCII_CHAR_P (str[len]); len++)
- buf[1 + len] = str[len];
- buf[1 + len] = ']';
- len += 2;
+ /* A special kludgey feature for single-character acronyms:
+ don't put them in a box, effectively treating them as a
+ replacement character. */
+ if (STRINGP (acronym) && SCHARS (acronym) == 1)
+ {
+ buf[0] = str[0];
+ len = 1;
+ }
+ else
+ {
+ buf[0] = '[';
+ for (len = 0;
+ len < 6 && str[len] && ASCII_CHAR_P (str[len]); len++)
+ buf[1 + len] = str[len];
+ buf[1 + len] = ']';
+ len += 2;
+ }
}
else
{
? CHAR_TABLE_REF (Vglyphless_char_display,
glyph->u.glyphless.ch)
: XCHAR_TABLE (Vglyphless_char_display)->extras[0]);
+ if (CONSP (acronym))
+ acronym = XCAR (acronym);
if (STRINGP (acronym))
str = SSDATA (acronym);
}
&& CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (Vglyphless_char_display)) >= 1)
{
if (c >= 0)
- {
- glyphless_method = CHAR_TABLE_REF (Vglyphless_char_display, c);
- if (CONSP (glyphless_method))
- glyphless_method = FRAME_WINDOW_P (it->f)
- ? XCAR (glyphless_method)
- : XCDR (glyphless_method);
- }
+ glyphless_method = CHAR_TABLE_REF (Vglyphless_char_display, c);
else
glyphless_method = XCHAR_TABLE (Vglyphless_char_display)->extras[0];
+
+ if (CONSP (glyphless_method))
+ glyphless_method = FRAME_WINDOW_P (it->f)
+ ? XCAR (glyphless_method)
+ : XCDR (glyphless_method);
}
retry:
The char-table has one extra slot to control the display of a character for
which no font is found. This slot only takes effect on graphical terminals.
Its value should be an ASCII acronym string, `hex-code', `empty-box', or
-`thin-space'. The default is `empty-box'.
+`thin-space'. It could also be a cons cell of any two of these, to specify
+separate values for graphical and text terminals.
+The default is `empty-box'.
If a character has a non-nil entry in an active display table, the
display table takes effect; in this case, Emacs does not consult
? CHAR_TABLE_REF (Vglyphless_char_display,
glyph->u.glyphless.ch)
: XCHAR_TABLE (Vglyphless_char_display)->extras[0]);
+ if (CONSP (acronym))
+ acronym = XCAR (acronym);
if (STRINGP (acronym))
str = SSDATA (acronym);
}