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

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

[elpa] externals/realgud ce45b16 025/140: making join string not emacs 2


From: Rocky Bernstein
Subject: [elpa] externals/realgud ce45b16 025/140: making join string not emacs 25 only
Date: Sat, 25 May 2019 19:35:24 -0400 (EDT)

branch: externals/realgud
commit ce45b1636df63befa57c1f13d63e2a38bc3ec3ee
Author: Jacob O'Donnell <address@hidden>
Commit: Jacob O'Donnell <address@hidden>

    making join string not emacs 25 only
---
 realgud/common/track.el | 6 ++++--
 realgud/common/utils.el | 6 ++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/realgud/common/track.el b/realgud/common/track.el
index c8a5d9a..bb54384 100644
--- a/realgud/common/track.el
+++ b/realgud/common/track.el
@@ -29,10 +29,11 @@
 (require-relative-list
  '("core"           "file"     "fringe"
    "helper"         "init"     "loc"    "lochist"
-   "regexp"         "shortkey" "window"
+   "regexp"         "shortkey" "window" "utils"
    "bp"
    ) "realgud-")
 
+
 (require-relative-list
  '("buffer/command" "buffer/helper" "buffer/source") "realgud-buffer-")
 
@@ -77,6 +78,7 @@
 (declare-function realgud-window-src                  'realgud-window)
 (declare-function realgud-window-src-undisturb-cmd    'realgud-window)
 (declare-function realgud-window-update-position      'realgud-window)
+(declare-function realgud:join-string                 'realgud-utils)
 
 (make-variable-buffer-local  (defvar realgud-track-mode))
 (fn-p-to-fn?-alias 'realgud-loc-p)
@@ -174,7 +176,7 @@ message."
 
 (defun realgud:get-eval-output(text)
   "Gets the output stripping the command and debugger prompt from the TEXT."
-  (string-join (butlast (cdr (split-string text "\n"))) "\n"))
+  (realgud:join-string (butlast (cdr (split-string text "\n"))) "\n"))
 
 (defun realgud:eval-command-p(text)
   "Checks the TEXT if the command that was ran was an eval command."
diff --git a/realgud/common/utils.el b/realgud/common/utils.el
index bc2eee0..e6aec5a 100644
--- a/realgud/common/utils.el
+++ b/realgud/common/utils.el
@@ -30,6 +30,12 @@
    (t
     (append (realgud:flatten (car mylist)) (realgud:flatten (cdr mylist))))))
 
+;; From 
https://stackoverflow.com/questions/12999530/is-there-a-function-that-joins-a-string-into-a-delimited-string
+(defun realgud:join-string (list joiner)
+  (if (< emacs-major-version 25)
+      (mapconcat 'identity list joiner)
+    (string-join list joiner)))
+
 (defun realgud:canonic-major-mode()
   "Return
     - 'eshell if we are in eshell-mode,



reply via email to

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