summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-gvfs.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2021-08-10 15:05:51 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2021-08-10 15:05:51 +0200
commit1572464b9271472b8d7a36b698541afc59b44870 (patch)
tree836fc2f7eb87c367521b2afb076a0f5cc1b7f0e0 /lisp/net/tramp-gvfs.el
parent75de09b9de2c800d074e2b65a03483d0d44ce3de (diff)
downloademacs-1572464b9271472b8d7a36b698541afc59b44870.tar.gz
Tramp string-search and string-replace compatibility functions
Add a `string-search` compatibility function for use in Tramp with Emacs version prior to 28, and fix the existing `string-replace` compatibility function so that it uses the right semantics. * lisp/net/tramp-compat.el (tramp-compat-string-replace): Use case-sensitive matching and literal replacement. (tramp-compat-string-search): New function. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions): * lisp/net/tramp-sh.el (tramp-sh-handle-file-name-all-completions) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-process, tramp-sh-handle-process-file): * lisp/net/tramp.el (tramp-handle-make-process): Use `tramp-compat-string-search` instead of `string-match-p`.
Diffstat (limited to 'lisp/net/tramp-gvfs.el')
-rw-r--r--lisp/net/tramp-gvfs.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index eff14a2912f..e4f54cf4c46 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1401,7 +1401,7 @@ If FILE-SYSTEM is non-nil, return file system attributes."
(defun tramp-gvfs-handle-file-name-all-completions (filename directory)
"Like `file-name-all-completions' for Tramp files."
- (unless (string-match-p "/" filename)
+ (unless (tramp-compat-string-search "/" filename)
(all-completions
filename
(with-parsed-tramp-file-name (expand-file-name directory) nil