aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2010-11-20 17:04:50 +0200
committerEli Zaretskii2010-11-20 17:04:50 +0200
commit7c2d713b9b2f469194017b115c1b0ab66c4e44e2 (patch)
tree593d8d634cb28fc38d1337034b666c9d8ddb79d5 /src
parentd2bd51898e48c2fd47a98a42654842a65feea7ad (diff)
downloademacs-7c2d713b9b2f469194017b115c1b0ab66c4e44e2.tar.gz
emacs-7c2d713b9b2f469194017b115c1b0ab66c4e44e2.zip
Use \uNNNN, \UNNNNNN, or \xNNNNNN for hex-code display on a TTY.
term.c (produce_glyphless_glyph): Use \uNNNN, \UNNNNNN, or \xNNNNNN for hex-code display of glyphless characters.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/term.c9
2 files changed, 9 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 552d8efe6f1..bb9f68acd5b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12010-11-20 Eli Zaretskii <eliz@gnu.org>
2
3 * term.c (produce_glyphless_glyph): Use \uNNNN, \UNNNNNN, or
4 \xNNNNNN for hex-code display of glyphless characters.
5
12010-11-20 Jan Djärv <jan.h.d@swipnet.se> 62010-11-20 Jan Djärv <jan.h.d@swipnet.se>
2 7
3 * gtkutil.c (xg_make_tool_item): Take vert_only as argument. 8 * gtkutil.c (xg_make_tool_item): Take vert_only as argument.
diff --git a/src/term.c b/src/term.c
index 4d452ed3e00..481a5d8853d 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1936,7 +1936,7 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym)
1936{ 1936{
1937 int face_id; 1937 int face_id;
1938 int len; 1938 int len;
1939 char buf[11], *str = " "; 1939 char buf[9], *str = " ";
1940 1940
1941 /* Get a face ID for the glyph by utilizing a cache (the same way as 1941 /* Get a face ID for the glyph by utilizing a cache (the same way as
1942 done for `escape-glyph' in get_next_display_element). */ 1942 done for `escape-glyph' in get_next_display_element). */
@@ -1987,10 +1987,9 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym)
1987 else 1987 else
1988 { 1988 {
1989 xassert (it->glyphless_method == GLYPHLESS_DISPLAY_HEX_CODE); 1989 xassert (it->glyphless_method == GLYPHLESS_DISPLAY_HEX_CODE);
1990 len = (it->c < 0x100 ? sprintf (buf, "[U+%02X]", it->c) 1990 len = (it->c < 0x10000 ? sprintf (buf, "\\u%04X", it->c)
1991 : it->c < 0x10000 ? sprintf (buf, "[U+%04X]", it->c) 1991 : it->c <= MAX_UNICODE_CHAR ? sprintf (buf, "\\U%06X", it->c)
1992 : it->c <= MAX_UNICODE_CHAR ? sprintf (buf, "[U+%06X]", it->c) 1992 : sprintf (buf, "\\x%06X", it->c));
1993 : sprintf (buf, "[E+%06X]", it->c));
1994 } 1993 }
1995 str = buf; 1994 str = buf;
1996 } 1995 }