From: Eshel Yaron Date: Sat, 27 Jan 2024 13:01:47 +0000 (+0100) Subject: ; (emoji--read-emoji): Signal error on empty input (Bug#68671) X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=121c0d8ef1a4cde8cc3538870e165f963227d074;p=emacs.git ; (emoji--read-emoji): Signal error on empty input (Bug#68671) --- diff --git a/lisp/international/emoji.el b/lisp/international/emoji.el index 3b97d6915af..cab1d2e663c 100644 --- a/lisp/international/emoji.el +++ b/lisp/international/emoji.el @@ -680,11 +680,12 @@ We prefer the earliest unique letter." ""))) strings))))) nil t))) - (when (cl-plusp (length name)) - (let ((glyph (if emoji-alternate-names - (cadr (split-string name "\t")) - (gethash name emoji--all-bases)))) - (cons glyph (gethash glyph emoji--derived)))))) + (if (cl-plusp (length name)) + (let ((glyph (if emoji-alternate-names + (cadr (split-string name "\t")) + (gethash name emoji--all-bases)))) + (cons glyph (gethash glyph emoji--derived))) + (user-error "You didn't specify an emoji")))) (defvar-keymap emoji-zoom-map "+" #'emoji-zoom-increase