summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-fuse.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2022-09-09 17:10:28 +0200
committerMichael Albinus <michael.albinus@gmx.de>2022-09-09 17:10:28 +0200
commit08cc6c4d9e42079f88c6c30d9a2324dd6f0cec2b (patch)
treea5f6e5325a24feb9a481df77c20e27e3b42683e7 /lisp/net/tramp-fuse.el
parent72c64dd73c93a92f91431435a0295d748588a4ed (diff)
downloademacs-08cc6c4d9e42079f88c6c30d9a2324dd6f0cec2b.tar.gz
Make use of rx in Tramp backward compatoble
* lisp/net/tramp-compat.el (tramp-compat-rx--runtime-params): New defvar. (tramp-compat-rx--transform-items) (tramp-compat-rx--transform-item, tramp-compat-rx--transform): New defuns. Suggested by Mattias EngdegÄrd <mattiase@acm.org>. (tramp-compat-rx): New defalias or defmacro. (tramp-compat-string-replace, tramp-compat-string-search): Use regexp-quote. * lisp/net/tramp.el: * lisp/net/tramp-adb.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-cmds.el: * lisp/net/tramp-crypt.el: * lisp/net/tramp-fuse.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-sh.el: * lisp/net/tramp-smb.el: * lisp/net/tramp-sudoedit.el: Use `tramp-compat-rx' where indicated. * test/lisp/net/tramp-archive-tests.el: * test/lisp/net/tramp-tests.el: Use `tramp-compat-rx' where indicated.
Diffstat (limited to 'lisp/net/tramp-fuse.el')
-rw-r--r--lisp/net/tramp-fuse.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/net/tramp-fuse.el b/lisp/net/tramp-fuse.el
index 8761dd1c07b..ea6b5a0622c 100644
--- a/lisp/net/tramp-fuse.el
+++ b/lisp/net/tramp-fuse.el
@@ -69,10 +69,11 @@
(tramp-fuse-local-file-name directory))))))))
(if full
;; Massage the result.
- (let ((local (rx bol
- (literal
- (tramp-fuse-mount-point
- (tramp-dissect-file-name directory)))))
+ (let ((local (tramp-compat-rx
+ bol
+ (literal
+ (tramp-fuse-mount-point
+ (tramp-dissect-file-name directory)))))
(remote (directory-file-name
(funcall
(if (tramp-compat-file-name-quoted-p directory)
@@ -179,7 +180,8 @@ It has the same meaning as `remote-file-name-inhibit-cache'.")
(tramp-set-file-property
vec "/" "mounted"
(when (string-match
- (rx bol (group (literal (tramp-fuse-mount-spec vec))) blank)
+ (tramp-compat-rx
+ bol (group (literal (tramp-fuse-mount-spec vec))) blank)
mount)
(match-string 1 mount)))))))