Fix Tramp completion for default method "-"

* lisp/net/tramp.el (tramp-completion-handle-file-name-all-completions):
Keep `tramp-default-method{-alist}' in order to get completion
functions for `tramp-default-method-marker'.
This commit is contained in:
Michael Albinus 2026-01-02 11:22:34 +01:00
parent 2175e9a192
commit 1e777f71f2

View file

@ -3044,14 +3044,7 @@ BODY is the backend specific code."
tramp--last-hop-directory
(tramp-make-tramp-file-name (tramp-dissect-hop-name hop))))
(let (;; When `tramp-syntax' is `simplified', we need a default method.
(tramp-default-method
(and (string-empty-p tramp-postfix-method-format)
tramp-default-method))
(tramp-default-method-alist
(and (string-empty-p tramp-postfix-method-format)
tramp-default-method-alist))
tramp-default-user tramp-default-user-alist
(let (tramp-default-user tramp-default-user-alist
tramp-default-host tramp-default-host-alist)
;; Possible completion structures.