commit 23921a932408ee4ab51d48a1e0877ad3cfda1cd1
parent a6c610d6e9674b49b383f2f7ab7df37fb41de733
Author: Iqbal Ansari <iqbalansari02@yahoo.com>
Date: Fri, 16 Sep 2016 23:54:23 +0530
Require subr-x, add a compat function for string-join
Diffstat:
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/emojify.el b/emojify.el
@@ -39,6 +39,7 @@
(require 'seq)
(require 'ht)
+(require 'subr-x nil)
(require 'json)
(require 'regexp-opt)
(require 'jit-lock)
@@ -113,6 +114,15 @@ priority on lower versions."
overlays-at-pos))
(overlays-at pos sorted)))
+(defun emojify--string-join (strings &optional separator)
+ "Join all STRINGS using SEPARATOR.
+
+This function is available on Emacs v24.4 and higher, it has been
+backported here for compatibility with older Emacsen."
+ (if (fboundp 'string-join)
+ (apply #'string-join (list strings separator))
+ (mapconcat 'identity strings separator)))
+
;; Debugging helpers
@@ -913,7 +923,7 @@ region containing the emoji."
end))
(defsubst emojify--get-composed-text (point)
- (string-join (mapcar #'char-to-string
+ (emojify--string-join (mapcar #'char-to-string
(decode-composition-components (nth 2
(find-composition point
nil