Function: emoji--compute-name
emoji--compute-name is a byte-compiled function defined in
emoji.el.gz.
Signature
(emoji--compute-name ENTRY)
Documentation
Add example emojis to the name.
Source Code
;; Defined in /usr/src/emacs/lisp/international/emoji.el.gz
(defun emoji--compute-name (entry)
"Add example emojis to the name."
(let* ((name (concat (car entry) " "))
(children (emoji--flatten entry))
(length (length name))
(max 30))
(cl-loop for i from 0 upto 20
;; Choose from all the children.
while (< length max)
do (cl-loop for child in children
for glyph = (elt child i)
while (< length max)
when glyph
do (setq name (concat name glyph)
length (+ length 2))))
(if (= (length name) max)
;; Make an ellipsis signal that we've not exhausted the
;; possibilities.
(concat name "…")
name)))