emacs-emojify

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

commit 7d00803afe2c2c7f7195ffc49cf9b4e7be3a863d
parent 3a4fa6e91df43e816c27fe4671f10c51c1110d3c
Author: Iqbal Ansari <iqbal.ansari@ignitesol.com>
Date:   Mon,  2 Nov 2015 16:34:27 +0530

Use `emojify-redisplay-emojis` wherever possible

Diffstat:
Memojify.el | 10++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/emojify.el b/emojify.el @@ -565,10 +565,8 @@ of `after-change-functions' to understand the meaning of BEG, END and LEN." (region-start (save-excursion (goto-char beg) (line-beginning-position)))) - ;; Remove previously added emojis - (emojify-undisplay-emojis-in-region region-start region-end) - ;; Add emojis to the region - (emojify-display-emojis-in-region region-start region-end))) + + (emojify-redisplay-emojis region-start region-end))) @@ -588,7 +586,7 @@ of `after-change-functions' to understand the meaning of BEG, END and LEN." (when (emojify-buffer-p (current-buffer)) ;; Install our jit-lock function - (jit-lock-register #'emojify-display-emojis-in-region) + (jit-lock-register #'emojify-redisplay-emojis) ;; Add an after change hook to emojify regions on change (add-hook 'after-change-functions #'emojify-after-change-function t t))) @@ -601,7 +599,7 @@ of `after-change-functions' to understand the meaning of BEG, END and LEN." (emojify-undisplay-emojis-in-region (point-min) (point-max))) ;; Uninstall our jit-lock function - (jit-lock-unregister #'emojify-display-emojis-in-region) + (jit-lock-unregister #'emojify-redisplay-emojis) ;; Uninstall our after change function (remove-hook 'after-change-functions #'emojify-after-change-function t))