diff options
author | Jim Porter <jporterbugs@gmail.com> | 2021-04-10 13:16:13 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2021-04-10 13:16:13 +0200 |
commit | c975258abf346fcc0186892b84ae32ebce8b70d2 (patch) | |
tree | 17b3776dc24da2db5d0728f206fcefd496696819 /lisp/net | |
parent | c50b5907e0113f7dbb2cc501c54dc365fd01a12b (diff) | |
download | emacs-c975258abf346fcc0186892b84ae32ebce8b70d2.tar.gz emacs-c975258abf346fcc0186892b84ae32ebce8b70d2.tar.bz2 emacs-c975258abf346fcc0186892b84ae32ebce8b70d2.zip |
Further fix of hostname completion on MS Windows
* lisp/net/tramp.el (tramp-completion-file-name-regexp-simplified)
(tramp-completion-file-name-regexp-separate): Fix W32 hostname/method
completion for simplified and separate syntaxes (same as the previous change
to default syntax).
Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp/net')
-rw-r--r-- | lisp/net/tramp.el | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index e61c3b1e44c..578fa148a24 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1103,7 +1103,13 @@ On W32 systems, the volume letter must be ignored.") (defconst tramp-completion-file-name-regexp-simplified (concat - "\\`/\\(" + "\\`" + ;; Allow the volume letter at the beginning of the path. See the + ;; comment in `tramp-completion-file-name-regexp-default' for more + ;; details. + (when (eq system-type 'windows-nt) + "\\(?:[[:alpha:]]:\\)?") + "/\\(" ;; Optional multi hop. "\\([^/|:]*|\\)*" ;; Last hop. @@ -1119,7 +1125,14 @@ See `tramp-file-name-structure' for more explanations. On W32 systems, the volume letter must be ignored.") (defconst tramp-completion-file-name-regexp-separate - "\\`/\\(\\[[^]]*\\)?\\'" + (concat + "\\`" + ;; Allow the volume letter at the beginning of the path. See the + ;; comment in `tramp-completion-file-name-regexp-default' for more + ;; details. + (when (eq system-type 'windows-nt) + "\\(?:[[:alpha:]]:\\)?") + "/\\(\\[[^]]*\\)?\\'") "Value for `tramp-completion-file-name-regexp' for separate remoting. See `tramp-file-name-structure' for more explanations.") |