Make describe-char include emoji combination descriptions

* lisp/descr-text.el (describe-char): Output emoji descriptions.
This commit is contained in:
Lars Ingebrigtsen 2021-11-06 18:21:05 +01:00
parent 6b706b1a7d
commit d8fc9021a6
2 changed files with 11 additions and 1 deletions

View file

@ -91,6 +91,9 @@ buffer is already open. Now, the old point is pushed to mark ring.
*** New key bindings in *Help* buffers: 'n' and 'p'.
These will take you (respectively) to the next and previous "page".
---
*** 'describe-char' now also outputs the name of emoji combinations.
** Outline Minor Mode
+++

View file

@ -417,6 +417,7 @@ The character information includes:
(display-table (or (window-display-table)
buffer-display-table
standard-display-table))
(composition-string nil)
(disp-vector (and display-table (aref display-table char)))
(multibyte-p enable-multibyte-characters)
(overlays (mapcar (lambda (o) (overlay-properties o))
@ -538,7 +539,8 @@ The character information includes:
(setcar composition nil)))
(setcar (cdr composition)
(format "composed to form \"%s\" (see below)"
(buffer-substring from to)))))
(setq composition-string
(buffer-substring from to))))))
(setq composition nil)))
(setq item-list
@ -682,6 +684,11 @@ The character information includes:
(if display
(format "terminal code %s" display)
"not encodable for terminal"))))))
,@(when-let ((composition-name
(and composition-string
(eq (aref char-script-table char) 'emoji)
(emoji-describe composition-string))))
(list (list "composition name" composition-name)))
,@(let ((face
(if (not (or disp-vector composition))
(cond