]> git.eshelyaron.com Git - emacs.git/commitdiff
Make describe-char include emoji combination descriptions
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 6 Nov 2021 17:21:05 +0000 (18:21 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 6 Nov 2021 17:22:01 +0000 (18:22 +0100)
* lisp/descr-text.el (describe-char): Output emoji descriptions.

etc/NEWS
lisp/descr-text.el

index 4f8c03dd9a8c98c9c80dc0d2d4459b5ddd9f21a1..2406342075cf7640135dc49c2124c2b4f7d5b342 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -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
 
 +++
index 98871164f2aa9cd48586d15eedc90797c8559c2b..2a239f81002dd518fa21fdd5f2340a9aaffdb33b 100644 (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