diff options
| author | Michael Albinus | 2020-01-07 13:10:35 +0100 |
|---|---|---|
| committer | Michael Albinus | 2020-01-07 13:10:35 +0100 |
| commit | 883b3490d82c4fac66c7427c411ddd9254e09be6 (patch) | |
| tree | 51c2e40e6092096263154c076343a3a80f327843 | |
| parent | c01f55f126fd057c7fe559de53d7edb81f92c832 (diff) | |
| download | emacs-883b3490d82c4fac66c7427c411ddd9254e09be6.tar.gz emacs-883b3490d82c4fac66c7427c411ddd9254e09be6.zip | |
* lisp/net/tramp.el (tramp-file-local-name): Remove `save-match-data'.
| -rw-r--r-- | lisp/net/tramp.el | 16 |
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. |
| 1340 | This function removes from NAME the specification of the remote | 1340 | This function removes from NAME the specification of the remote |
| 1341 | host and the method of accessing the host, leaving only the part | 1341 | host and the method of accessing the host, leaving only the part |
| 1342 | that identifies NAME locally on the remote system. NAME must be | 1342 | that identifies NAME locally on the remote system. If NAME does |
| 1343 | a string that matches `tramp-file-name-regexp'. The returned | 1343 | not match `tramp-file-name-regexp', just NAME is returned. The |
| 1344 | file name can be used directly as argument of `process-file', | 1344 | returned 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. |