From 0feb6733d4bea5f360abc3f64bfc5b9b29087c48 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 27 Jul 2018 09:47:37 +0300 Subject: Display raw bytes as belonging to 'eight-bit' charset * lisp/descr-text.el (describe-char): * lisp/simple.el (what-cursor-position): Display characters in the range #x3FFF80..#x3FFF9F as belonging to charset 'eight-bit', not 'tis620-2533'. * lisp/international/mule-diag.el (describe-character-set): Improve description of :supplementary-p. --- lisp/descr-text.el | 6 ++++++ lisp/international/mule-diag.el | 3 ++- lisp/simple.el | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/descr-text.el b/lisp/descr-text.el index ddd7d801d2a..00b40826f48 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -404,6 +404,12 @@ relevant to POS." (charset (if eight-bit-p 'eight-bit (or (get-text-property pos 'charset) (char-charset char)))) + ;; TIS620.2533 overlaps eight-bit-control, but we want to + ;; show eight-bit for raw bytes, not some obscure character + ;; set no one heard of. + (charset (if (eq charset 'tis620-2533) + 'eight-bit + charset)) (composition (find-composition pos nil nil t)) (component-chars nil) (display-table (or (window-display-table) diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index 7e225607a5a..b5a78338f63 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el @@ -355,7 +355,8 @@ meanings of these arguments." (:iso-revision-number "ISO revision number: " number-to-string) (:supplementary-p - "Used only as a parent of some other charset." nil))) + "Used only as a parent or a subset of some other charset, +or provided just for backward compatibility." nil))) (let ((val (get-charset-property charset (car elt)))) (when val (if (cadr elt) (insert (cadr elt))) diff --git a/lisp/simple.el b/lisp/simple.el index 8b183469f8a..90fea11dc1b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1353,7 +1353,7 @@ in *Help* buffer. See also the command `describe-char'." (if (or (not coding) (eq (coding-system-type coding) t)) (setq coding (default-value 'buffer-file-coding-system))) - (if (eq (char-charset char) 'eight-bit) + (if (and (>= char #x3fff80) (<= char #x3fffff)) (setq encoding-msg (format "(%d, #o%o, #x%x, raw-byte)" char char char)) ;; Check if the character is displayed with some `display' -- cgit v1.2.1