Function: emoji-describe
emoji-describe is an autoloaded, interactive and byte-compiled
function defined in emoji.el.gz.
Signature
(emoji-describe GLYPH &optional INTERACTIVE)
Documentation
Display the name of the grapheme cluster composed from GLYPH.
GLYPH should be a string of one or more characters which together produce an emoji. Interactively, GLYPH is the emoji at point (it could also be any character, not just emoji).
If called from Lisp, return the name as a string; return nil if the name is not known.
Probably introduced at or before Emacs version 29.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/international/emoji.el.gz
;;;###autoload
(defun emoji-describe (glyph &optional interactive)
"Display the name of the grapheme cluster composed from GLYPH.
GLYPH should be a string of one or more characters which together
produce an emoji. Interactively, GLYPH is the emoji at point (it
could also be any character, not just emoji).
If called from Lisp, return the name as a string; return nil if
the name is not known."
(interactive
(list (if (eobp)
(error "No glyph under point")
(let ((comp (find-composition (point) (1+ (point)))))
(if comp
(buffer-substring-no-properties (car comp) (cadr comp))
(buffer-substring-no-properties (point) (1+ (point))))))
t))
(require 'emoji-labels)
(if (not interactive)
;; Don't return a name for non-compositions when called
;; non-interactively.
(gethash glyph emoji--names)
;; Give a name for (pretty much) any glyph, including non-emojis.
(let ((name (emoji--name glyph)))
(if (not name)
(message "No known name for \"%s\"" glyph)
(message "The name of \"%s\" is \"%s\"" glyph name)))))