emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master ab759c2 2/2: Improve Tramp's compatibility


From: Michael Albinus
Subject: [Emacs-diffs] master ab759c2 2/2: Improve Tramp's compatibility
Date: Tue, 18 Aug 2015 12:26:06 +0000

branch: master
commit ab759c2241e759ba7783323bbfef137bc0a08634
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Improve Tramp's compatibility
    
    * lisp/net/tramp.el (tramp-get-method-parameter):
    * lisp/net/tramp-adb.el (tramp-adb-parse-device-names)
    (tramp-adb-get-device):
    * lisp/net/trampver.el (tramp-repository-get-version):
    Use `tramp-compat-replace-regexp-in-string'.
---
 lisp/net/tramp-adb.el |    6 +++---
 lisp/net/tramp.el     |    3 ++-
 lisp/net/trampver.el  |    3 ++-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index a8f5294..746bd67 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -211,7 +211,7 @@ pass to the OPERATION."
         (lambda (elt)
           (setcar
            (cdr elt)
-           (replace-regexp-in-string
+           (tramp-compat-replace-regexp-in-string
             ":" tramp-prefix-port-format (car (cdr elt)))))
         result)
        result))))
@@ -1032,7 +1032,7 @@ E.g. a host name \"192.168.1.1#5555\" returns 
\"192.168.1.1:5555\"
           (host (tramp-file-name-host vec))
           (port (tramp-file-name-port vec))
           (devices (mapcar 'cadr (tramp-adb-parse-device-names nil))))
-      (replace-regexp-in-string
+      (tramp-compat-replace-regexp-in-string
        tramp-prefix-port-format ":"
        (cond ((member host devices) host)
             ;; This is the case when the host is connected to the default port.
@@ -1048,7 +1048,7 @@ E.g. a host name \"192.168.1.1#5555\" returns 
\"192.168.1.1:5555\"
                   (not (zerop (length host)))
                   (not (tramp-adb-execute-adb-command
                          vec "connect"
-                         (replace-regexp-in-string
+                         (tramp-compat-replace-regexp-in-string
                           tramp-prefix-port-format ":" host))))
              ;; When new device connected, running other adb command (e.g.
              ;; adb shell) immediately will fail.  To get around this
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index e157321..e534b58 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1111,7 +1111,8 @@ If VEC is a vector, check first in connection properties.
 Afterwards, check in `tramp-methods'.  If the `tramp-methods'
 entry does not exist, return nil."
   (let ((hash-entry
-        (replace-regexp-in-string "^tramp-" "" (symbol-name param))))
+        (tramp-compat-replace-regexp-in-string
+         "^tramp-" "" (symbol-name param))))
     (if (tramp-connection-property-p vec hash-entry)
        ;; We use the cached property.
        (tramp-get-connection-property  vec hash-entry nil)
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 2f575f9..ab67120 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -50,7 +50,8 @@
                  (ignore-errors
                    (call-process "git" nil '(t nil) nil "rev-parse" "HEAD")))
                 (not (zerop (buffer-size)))
-                (replace-regexp-in-string "\n" "" (buffer-string)))))))))
+                (tramp-compat-replace-regexp-in-string
+                 "\n" "" (buffer-string)))))))))
 
 ;; Check for (X)Emacs version.
 (let ((x (if (or (>= emacs-major-version 22)



reply via email to

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