commit 78f7647817f8f6073ab0b808523d667b5611144b parent e23e1e43f1642f9bbd216849f42bd45b1f0e9434 Author: Iqbal Ansari <iqbalansari02@yahoo.com> Date: Tue, 17 Nov 2015 23:46:24 +0530 Do not restrict non-ascii emojis according to text context See #6 Diffstat:
M | emojify.el | | | 8 | +++++--- |
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/emojify.el b/emojify.el @@ -353,7 +353,7 @@ the visible area." (eq (nth 8 syntax-beg) (nth 8 syntax-end))))))))) -(defun emojify-valid-text-context-p (beg end) +(defun emojify-valid-ascii-emoji-context-p (beg end) "Determine if the okay to display for text between BEG and END." ;; The text is at the start of the buffer (and (or (not (char-before beg)) @@ -556,8 +556,10 @@ TODO: Skip emojifying if region is already emojified." ;; In prog mode enable respecting `emojify-prog-contexts' (emojify-valid-prog-context-p match-beginning match-end)) - ;; The text is at the beginning of the buffer - (emojify-valid-text-context-p match-beginning match-end) + ;; Display ascii emojis conservatively, since they have potential + ;; to be annoying consider d: in head: + (or (not (string= (ht-get (ht-get emojify-emojis match) "style") "ascii")) + (emojify-valid-ascii-emoji-context-p match-beginning match-end)) (not (emojify-inside-org-src-p match-beginning))