commit a951c22765b0855b6469f90267b5278c1b96b82e
parent 579d5ebd718f734d9d3c2f81aeefe40959a11762
Author: Iqbal Ansari <iqbalansari02@yahoo.com>
Date: Mon, 26 Oct 2015 09:23:00 +0530
Echo underlying text when point enters an emoji
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/emojify.el b/emojify.el
@@ -1,4 +1,5 @@
-;; Another plugin to waste time in Emacs :sweat: :worried: :unamused: :p
+;; -*- lexical-binding: t; -*-
+;; Another plugin to waste time in Emacs :sweat: :worried: :unamused: :p :) :P
;;
;; TODO: Bug in org-capture (what causes this)
;; Sometimes point is changed after adding emoji
@@ -36,7 +37,6 @@
nil
:ascent 'center
;; no-op if imagemagick is not available
-
:height (default-font-height)))))
(defun emojify--setup-emoji-display (start end match)
@@ -49,7 +49,8 @@
(eq (char-syntax (char-after end)) ?w))))
(add-text-properties start end (list 'display (pcase emoji-substitution-style
(`image (emojify-get-image match)))
- 'emojified t))))
+ 'emojified t
+ 'point-entered (lambda (x y) (message (format "%s" match)))))))
(defun emojify--emojify-region (beg end)
(let ((inhibit-point-motion-hooks t))