emacs-emojify

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

commit dff7ea3752b1201df6d3cb2d438fb7a19fb39e91
parent 5b8fd49505fc80f1838074e0f6641e5cfe402ff5
Author: Iqbal Ansari <iqbalansari02@yahoo.com>
Date:   Thu, 13 Jun 2019 00:36:39 +0530

Do not use seq-map-indexed

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

diff --git a/emojify.el b/emojify.el @@ -894,12 +894,14 @@ and then `emojify-emojis'." (defun emojify--get-characters-for-composition (composition) "Extract the characters from COMPOSITION." - (if (nth 3 composition) - (seq-filter #'identity - (seq-map-indexed (lambda (elt index) - (when (cl-evenp index) elt)) - (nth 2 composition))) - (nth 2 composition))) + (let ((index -1)) + (if (nth 3 composition) + (seq-filter #'identity + (seq-map (lambda (elt) + (cl-incf index) + (when (cl-evenp index) elt)) + (nth 2 composition))) + (nth 2 composition)))) (defun emojify--get-composed-text (point) "Get the text used as composition property at POINT.