Make last Tramp change less invasive
* lisp/net/tramp.el (tramp-dissect-file-name): Revert last change. (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory): Let-bind `tramp-default-proxies-alist'.
This commit is contained in:
parent
a72a1f24fc
commit
709d902002
1 changed files with 11 additions and 9 deletions
|
@ -1681,9 +1681,8 @@ The structure consists of method, user, domain, host, port,
|
||||||
localname (file name on remote host), and hop.
|
localname (file name on remote host), and hop.
|
||||||
|
|
||||||
Unless NODEFAULT is non-nil, method, user and host are expanded
|
Unless NODEFAULT is non-nil, method, user and host are expanded
|
||||||
to their default values. Hop is set to nil if NODEFAULT is non-nil.
|
to their default values. For the other file name parts, no
|
||||||
|
default values are used."
|
||||||
For the other file name parts, no default values are used."
|
|
||||||
(save-match-data
|
(save-match-data
|
||||||
(unless (tramp-tramp-file-p name)
|
(unless (tramp-tramp-file-p name)
|
||||||
(tramp-user-error nil "Not a Tramp file name: \"%s\"" name))
|
(tramp-user-error nil "Not a Tramp file name: \"%s\"" name))
|
||||||
|
@ -1709,8 +1708,7 @@ For the other file name parts, no default values are used."
|
||||||
(when (string-match tramp-postfix-ipv6-regexp host)
|
(when (string-match tramp-postfix-ipv6-regexp host)
|
||||||
(setq host (replace-match "" nil t host))))
|
(setq host (replace-match "" nil t host))))
|
||||||
|
|
||||||
(if nodefault
|
(unless nodefault
|
||||||
(setq hop nil)
|
|
||||||
(when hop
|
(when hop
|
||||||
(setq v (tramp-dissect-hop-name hop)
|
(setq v (tramp-dissect-hop-name hop)
|
||||||
hop (and hop (tramp-make-tramp-hop-name v))))
|
hop (and hop (tramp-make-tramp-hop-name v))))
|
||||||
|
@ -3894,8 +3892,10 @@ Let-bind it when necessary.")
|
||||||
(defun tramp-handle-file-name-as-directory (file)
|
(defun tramp-handle-file-name-as-directory (file)
|
||||||
"Like `file-name-as-directory' for Tramp files."
|
"Like `file-name-as-directory' for Tramp files."
|
||||||
;; `file-name-as-directory' would be sufficient except localname is
|
;; `file-name-as-directory' would be sufficient except localname is
|
||||||
;; the empty string.
|
;; the empty string. Suppress adding a hop to
|
||||||
(let ((v (tramp-dissect-file-name file t)))
|
;; `tramp-default-proxies-alist' due to non-expanded default values.
|
||||||
|
(let ((v (tramp-dissect-file-name file t))
|
||||||
|
tramp-default-proxies-alist)
|
||||||
;; Run the command on the localname portion only unless we are in
|
;; Run the command on the localname portion only unless we are in
|
||||||
;; completion mode.
|
;; completion mode.
|
||||||
(tramp-make-tramp-file-name
|
(tramp-make-tramp-file-name
|
||||||
|
@ -3985,8 +3985,10 @@ Let-bind it when necessary.")
|
||||||
"Like `file-name-directory' for Tramp files."
|
"Like `file-name-directory' for Tramp files."
|
||||||
;; Everything except the last filename thing is the directory. We
|
;; Everything except the last filename thing is the directory. We
|
||||||
;; cannot apply `with-parsed-tramp-file-name', because this expands
|
;; cannot apply `with-parsed-tramp-file-name', because this expands
|
||||||
;; the remote file name parts.
|
;; the remote file name parts. Suppress adding a hop to
|
||||||
(let ((v (tramp-dissect-file-name file t)))
|
;; `tramp-default-proxies-alist' due to non-expanded default values.
|
||||||
|
(let ((v (tramp-dissect-file-name file t))
|
||||||
|
tramp-default-proxies-alist)
|
||||||
;; Run the command on the localname portion only. If this returns
|
;; Run the command on the localname portion only. If this returns
|
||||||
;; nil, mark also the localname part of `v' as nil.
|
;; nil, mark also the localname part of `v' as nil.
|
||||||
(tramp-make-tramp-file-name
|
(tramp-make-tramp-file-name
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue