aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2020-01-07 13:10:35 +0100
committerMichael Albinus2020-01-07 13:10:35 +0100
commit883b3490d82c4fac66c7427c411ddd9254e09be6 (patch)
tree51c2e40e6092096263154c076343a3a80f327843
parentc01f55f126fd057c7fe559de53d7edb81f92c832 (diff)
downloademacs-883b3490d82c4fac66c7427c411ddd9254e09be6.tar.gz
emacs-883b3490d82c4fac66c7427c411ddd9254e09be6.zip
* lisp/net/tramp.el (tramp-file-local-name): Remove `save-match-data'.
-rw-r--r--lisp/net/tramp.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 52c6a9ec430..e0013def5d0 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1339,14 +1339,14 @@ entry does not exist, return nil."
1339 "Return the local name component of NAME. 1339 "Return the local name component of NAME.
1340This function removes from NAME the specification of the remote 1340This function removes from NAME the specification of the remote
1341host and the method of accessing the host, leaving only the part 1341host and the method of accessing the host, leaving only the part
1342that identifies NAME locally on the remote system. NAME must be 1342that identifies NAME locally on the remote system. If NAME does
1343a string that matches `tramp-file-name-regexp'. The returned 1343not match `tramp-file-name-regexp', just NAME is returned. The
1344file name can be used directly as argument of `process-file', 1344returned file name can be used directly as argument of
1345`start-file-process', or `shell-command'." 1345`process-file', `start-file-process', or `shell-command'."
1346 (save-match-data 1346 (or (and (tramp-tramp-file-p name)
1347 (and (tramp-tramp-file-p name) 1347 (string-match (nth 0 tramp-file-name-structure) name)
1348 (string-match (nth 0 tramp-file-name-structure) name) 1348 (match-string (nth 4 tramp-file-name-structure) name))
1349 (match-string (nth 4 tramp-file-name-structure) name)))) 1349 name))
1350 1350
1351(defun tramp-find-method (method user host) 1351(defun tramp-find-method (method user host)
1352 "Return the right method string to use depending on USER and HOST. 1352 "Return the right method string to use depending on USER and HOST.