]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve Tramp's compatibility
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 18 Aug 2015 12:25:45 +0000 (14:25 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 18 Aug 2015 12:25:45 +0000 (14:25 +0200)
* 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
lisp/net/tramp.el
lisp/net/trampver.el

index a8f52943f489e5c4ec5e6575401b1c626e208b31..746bd67508910d428d01d3d37bdb061a2fc8e61a 100644 (file)
@@ -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
index e15732182d78ef1e30ca2a248b9ae154ef88eba2..e534b5841b6dc59f333349dab1419641734e720a 100644 (file)
@@ -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)
index 2f575f93037160e5d94e4b25855c8f26674f495e..ab671204e32dfd865585c857d5680b33c9eba2a3 100644 (file)
@@ -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)