emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 2d7c3e4: Improve display of compositions by "C-u C-x ="


From: Eli Zaretskii
Subject: master 2d7c3e4: Improve display of compositions by "C-u C-x ="
Date: Thu, 9 Jul 2020 13:43:18 -0400 (EDT)

branch: master
commit 2d7c3e49b0a237dd05fd35d765676ec1d4dd0730
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    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)
---
 lisp/descr-text.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 776ce76..22c162a 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]