emacs-emojify

fork of https://github.com/iqbalansari/emacs-emojify
Log | Files | Refs | LICENSE

commit c5a73967423e0713d9578c16468300ddf9f8c0a5
parent 9b069e1dba936e049120a2043bab3a35d6502149
Author: Iqbal Ansari <iqbalansari02@yahoo.com>
Date:   Sat,  8 Oct 2016 00:03:04 +0530

Initial version of describe emoji functionality

Diffstat:
Memojify.el | 21+++++++++++++++++++++
1 file changed, 21 insertions(+), 0 deletions(-)

diff --git a/emojify.el b/emojify.el @@ -961,6 +961,8 @@ should not be a problem 🤞." (buffer (current-buffer)) (emoji (emojify-get-emoji match))) (when (and emoji + (not (or (get-text-property match-beginning 'emojify-inhibit) + (get-text-property match-end 'emojify-inhibit))) (memql (intern (ht-get emoji "style")) emojify-emoji-styles) ;; Skip displaying this emoji if the its bounds are @@ -1538,6 +1540,25 @@ This respects the `emojify-emoji-styles' variable." (insert (car (split-string (completing-read "Insert Emoji: " candidates) " "))))) +(defun emojify-describe-emoji-at-point () + (interactive) + (if (not (get-text-property (point) 'emojified)) + (user-error "No emoji at point!") + (let* ((emoji-text (get-text-property (point) 'emojify-text)) + (emoji (emojify-get-emoji emoji-text))) + (with-electric-help + (lambda () + (insert (propertize emoji-text 'emojify-inhibit t) + " - Displayed as " + emoji-text + "\n\n") + (insert "Name - " (ht-get emoji "name") "\n") + (insert "Style - " (ht-get emoji "style") "\n") + (insert "Image used - " + (expand-file-name (ht-get emoji "image") + (emojify-image-dir))) + (emojify-redisplay-emojis-in-region)))))) + ;; Integration with some miscellaneous functionality