]> git.eshelyaron.com Git - emacs.git/commit
Tramp string-search and string-replace compatibility functions
authorMattias Engdegård <mattiase@acm.org>
Tue, 10 Aug 2021 13:05:51 +0000 (15:05 +0200)
committerMattias Engdegård <mattiase@acm.org>
Tue, 10 Aug 2021 13:05:51 +0000 (15:05 +0200)
commit1572464b9271472b8d7a36b698541afc59b44870
tree836fc2f7eb87c367521b2afb076a0f5cc1b7f0e0
parent75de09b9de2c800d074e2b65a03483d0d44ce3de
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`.
lisp/net/tramp-compat.el
lisp/net/tramp-gvfs.el
lisp/net/tramp-sh.el
lisp/net/tramp.el