From: Eli Zaretskii Date: Thu, 9 Jul 2020 17:42:04 +0000 (+0300) Subject: Improve display of compositions by "C-u C-x =" X-Git-Tag: emacs-28.0.90~7037 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2d7c3e49b0a237dd05fd35d765676ec1d4dd0730;p=emacs.git Improve display of compositions by "C-u C-x =" * lisp/descr-text.el (describe-char): On TTY frames, display the Unicode names of the composed characters as well. (Bug#42256) --- diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 776ce7618d5..22c162a05ac 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -763,6 +763,8 @@ The character information includes: (to (nth 4 composition)) glyph) (if (fontp font) + ;; GUI frame: show composition in terms of font + ;; glyphs. (progn (insert " using this font:\n " (symbol-name (font-get font :type)) @@ -773,11 +775,14 @@ The character information includes: (setq glyph (lgstring-glyph gstring from))) (insert (format " %S\n" glyph)) (setq from (1+ from)))) + ;; TTY frame: show composition in terms of characters. (insert " by these characters:\n") (while (and (<= from to) (setq glyph (lgstring-glyph gstring from))) - (insert (format " %c (#x%x)\n" - (lglyph-char glyph) (lglyph-char glyph))) + (insert (format " %c (#x%x) %s\n" + (lglyph-char glyph) (lglyph-char glyph) + (get-char-code-property + (lglyph-char glyph) 'name))) (setq from (1+ from))))) (insert " by the rule:\n\t(") (let ((first t))