commit d6df3f72f237cdf35936cdf25cf9dd97900172f8 parent 9ce171d38915c81ba0f387e013aad2e089d61d48 Author: Iqbal Ansari <iqbalansari02@yahoo.com> Date: Sun, 26 Mar 2017 04:18:51 +0530 Add link to Unicode Consortium in Emoji description Diffstat:
M | emojify.el | | | 35 | +++++++++++++++++++++++------------ |
1 file changed, 23 insertions(+), 12 deletions(-)
diff --git a/emojify.el b/emojify.el @@ -1709,18 +1709,29 @@ This respects the `emojify-emoji-styles' variable." ": " (if (ht-get emoji "custom") "Yes" "No") "\n") - (insert (propertize "Emojipedia" 'face 'font-lock-keyword-face) - ": " - (let* ((tone-stripped (replace-regexp-in-string "- *[Tt]one *\\([0-9]+\\)$" - "- type \\1" - (ht-get emoji "name"))) - (non-alphanumeric-stripped (replace-regexp-in-string "[^0-9a-zA-Z]" - " " - tone-stripped)) - (words (split-string non-alphanumeric-stripped " " t " "))) - (concat "http://emojipedia.org/" - (downcase (emojify--string-join words "-")))) - "\n"))) + (unless (ht-get emoji "custom") + (when (or (ht-get emoji "unicode") + (string= (ht-get emoji "style") "unicode")) + (insert (propertize "Unicode Consortium" 'face 'font-lock-keyword-face) + ": " + (concat "http://www.unicode.org/emoji/charts-beta/full-emoji-list.html#" + (string-join (mapcar (apply-partially #'format "%x") + (string-to-list (or (ht-get emoji "unicode") + (ht-get emoji "emoji")))) + "_")) + "\n")) + (insert (propertize "Emojipedia" 'face 'font-lock-keyword-face) + ": " + (let* ((tone-stripped (replace-regexp-in-string "- *[Tt]one *\\([0-9]+\\)$" + "- type \\1" + (ht-get emoji "name"))) + (non-alphanumeric-stripped (replace-regexp-in-string "[^0-9a-zA-Z]" + " " + tone-stripped)) + (words (split-string non-alphanumeric-stripped " " t " "))) + (concat "http://emojipedia.org/" + (downcase (emojify--string-join words "-")))) + "\n")))) (emojify-description-mode) (setq emojify-described-emoji (ht-get emoji "emoji"))) (display-buffer (get-buffer emojify-help-buffer-name))