]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix indexing gendered emoji forms that have "person" base forms
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 19 Dec 2021 11:46:01 +0000 (12:46 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 19 Dec 2021 11:46:01 +0000 (12:46 +0100)
* lisp/international/emoji.el (emoji--base-name): Index man/woman
on the generic form we have read already (bug#52580).

lisp/international/emoji.el

index 1202571b3206a2de2166cc8bff09de3b68d116c0..d0e906848cbeba441471fcfb5bf2cd19434ff4fa 100644 (file)
@@ -417,10 +417,13 @@ the name is not known."
                                                base)))
     ;; If we have (for instance) "person golfing", and we're adding
     ;; "man golfing", make the latter a derivation of the former.
-    (if (or (gethash (concat "person " non-binary) derivations)
-            (gethash non-binary derivations))
-        non-binary
-      base)))
+    (cond
+     ((gethash (concat "person " non-binary) derivations)
+      (concat "person " non-binary))
+     ((gethash non-binary derivations)
+      non-binary)
+     (t
+      base))))
 
 (defun emoji--split-subgroup (subgroup)
   (let ((prefixes '("face" "hand" "person" "animal" "plant"