1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-12 09:28:24 +00:00

Display "C-u C-x =" composed character names on GUI frames as well

* lisp/descr-text.el (describe-char): On GUI frames, display the
Unicode names of the composed characters like they are displayed
on TTY frames.  (Bug#42256)
This commit is contained in:
Juri Linkov 2020-07-13 02:33:02 +03:00
parent 0339325d53
commit 46a0c115f0

View File

@ -763,8 +763,8 @@ The character information includes:
(to (nth 4 composition)) (to (nth 4 composition))
glyph) glyph)
(if (fontp font) (if (fontp font)
;; GUI frame: show composition in terms of font ;; GUI frame: show composition in terms of
;; glyphs. ;; font glyphs and characters.
(progn (progn
(insert " using this font:\n " (insert " using this font:\n "
(symbol-name (font-get font :type)) (symbol-name (font-get font :type))
@ -774,7 +774,14 @@ The character information includes:
(while (and (<= from to) (while (and (<= from to)
(setq glyph (lgstring-glyph gstring from))) (setq glyph (lgstring-glyph gstring from)))
(insert (format " %S\n" glyph)) (insert (format " %S\n" glyph))
(setq from (1+ from)))) (setq from (1+ from)))
(insert "from these character(s):\n")
(dotimes (i (lgstring-char-len gstring))
(let ((char (lgstring-char gstring i)))
(insert (format " %c (#x%x) %s\n"
char char
(get-char-code-property
char 'name))))))
;; TTY frame: show composition in terms of characters. ;; TTY frame: show composition in terms of characters.
(insert " by these characters:\n") (insert " by these characters:\n")
(while (and (<= from to) (while (and (<= from to)