emacs-diffs
[Top][All Lists]
Advanced

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

master d8fc902 2/2: Make describe-char include emoji combination descrip


From: Lars Ingebrigtsen
Subject: master d8fc902 2/2: Make describe-char include emoji combination descriptions
Date: Sat, 6 Nov 2021 13:22:10 -0400 (EDT)

branch: master
commit d8fc9021a60fd7dd219d64a40bce678a80a35b73
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Make describe-char include emoji combination descriptions
    
    * lisp/descr-text.el (describe-char): Output emoji descriptions.
---
 etc/NEWS           | 3 +++
 lisp/descr-text.el | 9 ++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/etc/NEWS b/etc/NEWS
index 4f8c03d..2406342 100644
--- 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
 
 +++
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 9887116..2a239f8 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -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



reply via email to

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