emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/auctex 4688310 65/95: Add new compat function `TeX-repl


From: Tassilo Horn
Subject: [elpa] externals/auctex 4688310 65/95: Add new compat function `TeX-replace-regexp-in-string'
Date: Sun, 16 Apr 2017 01:26:56 -0400 (EDT)

branch: externals/auctex
commit 46883103da47a8b9cea80dc11a2090fb248a04c0
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>

    Add new compat function `TeX-replace-regexp-in-string'
    
    * tex.el (TeX-replace-regexp-in-string): New compat function.
    With XEmacs, pass arguments to `replace-in-string', with Emacs to
    `replace-regexp-in-string'.  This function supports only mandatory
    arguments of the original functions just mentioned.
---
 tex.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tex.el b/tex.el
index 64e5ea2..d5a8513 100644
--- a/tex.el
+++ b/tex.el
@@ -762,7 +762,11 @@ overlays."
             (/ outer-priority 2))
            ((and inner-priority outer-priority)
             (+ (/ (- outer-priority inner-priority) 2) inner-priority))
-           (t TeX-overlay-priority-step)))) )
+           (t TeX-overlay-priority-step))))
+
+  (defun TeX-replace-regexp-in-string (regexp rep string)
+    "Compatibility function mimicking `replace-regexp-in-string' for XEmacs."
+    (replace-in-string string regexp rep)) )
 
 ;; require crm here, because we often do
 ;;
@@ -900,7 +904,9 @@ overlays."
             (/ outer-priority 2))
            ((and inner-priority outer-priority)
             (+ (/ (- outer-priority inner-priority) 2) inner-priority))
-           (t TeX-overlay-priority-step)))) )
+           (t TeX-overlay-priority-step))))
+
+  (defalias #'TeX-replace-regexp-in-string #'replace-regexp-in-string) )
 
 (defun TeX-delete-dups-by-car (alist &optional keep-list)
   "Return a list of all elements in ALIST, but each car only once.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]