diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index eaa701e9cf1..53210e5be5b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -7055,7 +7055,7 @@ get_next_display_element (struct it *it) | |||
| 7055 | translated too. | 7055 | translated too. |
| 7056 | 7056 | ||
| 7057 | Non-printable characters and raw-byte characters are also | 7057 | Non-printable characters and raw-byte characters are also |
| 7058 | translated to octal form. */ | 7058 | translated to octal or hexadecimal form. */ |
| 7059 | if (((c < ' ' || c == 127) /* ASCII control chars. */ | 7059 | if (((c < ' ' || c == 127) /* ASCII control chars. */ |
| 7060 | ? (it->area != TEXT_AREA | 7060 | ? (it->area != TEXT_AREA |
| 7061 | /* In mode line, treat \n, \t like other crl chars. */ | 7061 | /* In mode line, treat \n, \t like other crl chars. */ |
| @@ -7162,9 +7162,12 @@ get_next_display_element (struct it *it) | |||
| 7162 | int len, i; | 7162 | int len, i; |
| 7163 | 7163 | ||
| 7164 | if (CHAR_BYTE8_P (c)) | 7164 | if (CHAR_BYTE8_P (c)) |
| 7165 | /* Display \200 instead of \17777600. */ | 7165 | /* Display \200 or \x80 instead of \17777600. */ |
| 7166 | c = CHAR_TO_BYTE8 (c); | 7166 | c = CHAR_TO_BYTE8 (c); |
| 7167 | len = sprintf (str, "%03o", c + 0u); | 7167 | const char *format_string = display_raw_bytes_as_hex |
| 7168 | ? "x%02x" | ||
| 7169 | : "%03o"; | ||
| 7170 | len = sprintf (str, format_string, c + 0u); | ||
| 7168 | 7171 | ||
| 7169 | XSETINT (it->ctl_chars[0], escape_glyph); | 7172 | XSETINT (it->ctl_chars[0], escape_glyph); |
| 7170 | for (i = 0; i < len; i++) | 7173 | for (i = 0; i < len; i++) |
| @@ -32231,6 +32234,13 @@ display table takes effect; in this case, Emacs does not consult | |||
| 32231 | /* Initialize to t, since we need to disable reordering until | 32234 | /* Initialize to t, since we need to disable reordering until |
| 32232 | loadup.el successfully loads charprop.el. */ | 32235 | loadup.el successfully loads charprop.el. */ |
| 32233 | redisplay__inhibit_bidi = true; | 32236 | redisplay__inhibit_bidi = true; |
| 32237 | |||
| 32238 | DEFVAR_BOOL ("display-raw-bytes-as-hex", display_raw_bytes_as_hex, | ||
| 32239 | doc: /* Non-nil means display raw bytes in hexadecimal format. | ||
| 32240 | The default is to use octal format (\200) whereas hexadecimal (\x80) | ||
| 32241 | may be more familar to users. */); | ||
| 32242 | display_raw_bytes_as_hex = false; | ||
| 32243 | |||
| 32234 | } | 32244 | } |
| 32235 | 32245 | ||
| 32236 | 32246 | ||