From 087359e8510fdca3f4b826516d61777c8cbaf978 Mon Sep 17 00:00:00 2001
From: Omar Polo <op@omarpolo.com>
Date: Tue, 17 Aug 2021 09:04:17 +0000
Subject: [PATCH] use replace-regexp-in-string instead of string-replace

string-replace is new of emacs 28, while replace-regexp-in-string is
quite old.  This avoids the backport, and should be a tad faster since
it don't have to waste cycle to regexp-quote "\n".

Tested on emacs 27.2

Signed-off-by: Justin Abrahms <justin@abrah.ms>
---
 ox-gemini.el | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/ox-gemini.el b/ox-gemini.el
index 9e19de7..7b679ba 100644
--- a/ox-gemini.el
+++ b/ox-gemini.el
@@ -21,15 +21,6 @@
 (require 'ox-ascii)
 (require 'cl-lib)
 
-;; backport for older emacs verisons
-(if (not (fboundp 'string-replace))
-    (progn
-      (defun string-replace (from to in)
-        (replace-regexp-in-string (regexp-quote from) to in nil 'literal))
-      (declare-function string-replace "ox-gemini")
-    ))
-
-
 ;; TODO:
 ;; Sublists aren't supported in gemini
 ;; There's a trailing space after inline code samples
@@ -60,7 +51,7 @@
 
 (defun org-gemini-paragraph (_paragraph contents _info)
   "CONTENTS is the text of the paragraph."
-  (concat (string-replace "\n" " " contents)
+  (concat (replace-regexp-in-string "\n" " " contents)
           "\n"))
 
 (defun org-gemini-item (_input contents _info)