diff options
| author | Michael Albinus | 2017-04-16 16:51:24 +0200 |
|---|---|---|
| committer | Michael Albinus | 2017-04-16 16:51:24 +0200 |
| commit | 8d96feae07c618f591a952f8f10ae949735b4050 (patch) | |
| tree | 4ccdd07d64cd843af9881cb79cc1a69a1c7b365c /lisp | |
| parent | 92879a1b035baf297158812ccdbaf6ae1d157e16 (diff) | |
| download | emacs-8d96feae07c618f591a952f8f10ae949735b4050.tar.gz emacs-8d96feae07c618f591a952f8f10ae949735b4050.zip | |
Tuning for `separate' Tramp syntax
* lisp/net/tramp.el (tramp-method-regexp): Fix it for `separate' syntax.
(tramp-completion-file-name-regexp-separate): Simplify.
* test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect-separate):
Extend test.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/net/tramp.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 12169d473e4..9b80c596a3a 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -717,7 +717,10 @@ Should always start with \"^\". Derived from `tramp-prefix-format'." | |||
| 717 | (defun tramp-method-regexp () | 717 | (defun tramp-method-regexp () |
| 718 | "Regexp matching methods identifiers. | 718 | "Regexp matching methods identifiers. |
| 719 | The `ftp' syntax does not support methods." | 719 | The `ftp' syntax does not support methods." |
| 720 | (if (eq (tramp-compat-tramp-syntax) 'simplified) "" "[a-zA-Z0-9-]+")) | 720 | (cond ((eq (tramp-compat-tramp-syntax) 'default) "[a-zA-Z0-9-]+") |
| 721 | ((eq (tramp-compat-tramp-syntax) 'simplified) "") | ||
| 722 | ((eq (tramp-compat-tramp-syntax) 'separate) "[a-zA-Z0-9-]*") | ||
| 723 | (t (error "Wrong `tramp-syntax' %s" tramp-syntax)))) | ||
| 721 | 724 | ||
| 722 | (defun tramp-postfix-method-format () | 725 | (defun tramp-postfix-method-format () |
| 723 | "String matching delimiter between method and user or host names. | 726 | "String matching delimiter between method and user or host names. |
| @@ -942,7 +945,7 @@ See `tramp-file-name-structure' for more explanations. | |||
| 942 | On W32 systems, the volume letter must be ignored.") | 945 | On W32 systems, the volume letter must be ignored.") |
| 943 | 946 | ||
| 944 | (defconst tramp-completion-file-name-regexp-separate | 947 | (defconst tramp-completion-file-name-regexp-separate |
| 945 | "\\`/\\[\\([^]]*\\)?\\'" | 948 | "\\`/\\[[^]]*\\'" |
| 946 | "Value for `tramp-completion-file-name-regexp' for separate remoting. | 949 | "Value for `tramp-completion-file-name-regexp' for separate remoting. |
| 947 | See `tramp-file-name-structure' for more explanations.") | 950 | See `tramp-file-name-structure' for more explanations.") |
| 948 | 951 | ||
| @@ -2306,7 +2309,7 @@ not in completion mode." | |||
| 2306 | 2309 | ||
| 2307 | ;; Method, host name and user name completion. | 2310 | ;; Method, host name and user name completion. |
| 2308 | ;; `tramp-completion-dissect-file-name' returns a list of | 2311 | ;; `tramp-completion-dissect-file-name' returns a list of |
| 2309 | ;; tramp-file-name structures. For all of them we return possible completions. | 2312 | ;; tramp-file-name structures. For all of them we return possible completions. |
| 2310 | (defun tramp-completion-handle-file-name-all-completions (filename directory) | 2313 | (defun tramp-completion-handle-file-name-all-completions (filename directory) |
| 2311 | "Like `file-name-all-completions' for partial Tramp files." | 2314 | "Like `file-name-all-completions' for partial Tramp files." |
| 2312 | 2315 | ||