summaryrefslogtreecommitdiff
path: root/lisp/isearch.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2023-01-30 19:39:33 +0200
committerJuri Linkov <juri@linkov.net>2023-01-30 19:39:33 +0200
commit2f3683cd4dc1e2358ae5f8c11f30a773f4540df7 (patch)
tree1847560c5bde600cb63bc41dc22953f6ae251d31 /lisp/isearch.el
parent86b03046c0097aa7bd342efe9b9fde711ed81755 (diff)
downloademacs-2f3683cd4dc1e2358ae5f8c11f30a773f4540df7.tar.gz
* lisp/isearch.el (isearch-emoji-by-name): Disable derived emoji (bug#60740).
Let-bind emoji--derived to nil to avoid the subsequent selection of derived emoji that fails in transient.el.
Diffstat (limited to 'lisp/isearch.el')
-rw-r--r--lisp/isearch.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index bb46c89ae20..22e27764127 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2774,6 +2774,7 @@ With argument, add COUNT copies of the character."
(mapconcat 'isearch-text-char-description
string ""))))))))
+(defvar emoji--derived)
(defun isearch-emoji-by-name (&optional count)
"Read an Emoji name and add it to the search string COUNT times.
COUNT (interactively, the prefix argument) defaults to 1.
@@ -2782,7 +2783,13 @@ The command accepts Unicode names like \"smiling face\" or
(interactive "p")
(with-isearch-suspended
(let ((emoji (with-temp-buffer
- (emoji-search)
+ ;; Derived emoji not supported yet (bug#60740).
+ ;; So first load `emoji--labels', then `emoji--init'
+ ;; will not fill `emoji--derived' that is set
+ ;; to an empty hash table below.
+ (ignore-errors (require 'emoji-labels))
+ (let ((emoji--derived (make-hash-table :test #'equal)))
+ (emoji-search))
(if (and (integerp count) (> count 1))
(apply 'concat (make-list count (buffer-string)))
(buffer-string)))))