Avoid signaling errors in emoji.el on empty input
* lisp/international/emoji.el (emoji--read-emoji): Signal user-error on empty input. (Bug#68671) Do not merge to master.
This commit is contained in:
parent
53481cc954
commit
3c2baa1b95
1 changed files with 6 additions and 5 deletions
|
@ -680,11 +680,12 @@ We prefer the earliest unique letter."
|
||||||
strings))))
|
strings))))
|
||||||
(complete-with-action action table string pred)))
|
(complete-with-action action table string pred)))
|
||||||
nil t)))
|
nil t)))
|
||||||
(when (cl-plusp (length name))
|
(if (cl-plusp (length name))
|
||||||
(let ((glyph (if emoji-alternate-names
|
(let ((glyph (if emoji-alternate-names
|
||||||
(cadr (split-string name "\t"))
|
(cadr (split-string name "\t"))
|
||||||
(gethash name emoji--all-bases))))
|
(gethash name emoji--all-bases))))
|
||||||
(cons glyph (gethash glyph emoji--derived))))))
|
(cons glyph (gethash glyph emoji--derived)))
|
||||||
|
(user-error "You didn't specify an emoji"))))
|
||||||
|
|
||||||
(defun emoji--choose-emoji ()
|
(defun emoji--choose-emoji ()
|
||||||
(pcase-let ((`(,glyph . ,derived) (emoji--read-emoji)))
|
(pcase-let ((`(,glyph . ,derived) (emoji--read-emoji)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue