aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2011-08-31 10:18:20 +0200
committerMichael Albinus2011-08-31 10:18:20 +0200
commit5bc3b51d1ec7f6ff63e08d5e1c889a84a4eaf29c (patch)
tree5975f7dc1c56302f7ace20a3a6bd32da8a254e17
parentb0de839f5d989e8e10cd59bc4c9aeb32ffce956c (diff)
downloademacs-5bc3b51d1ec7f6ff63e08d5e1c889a84a4eaf29c.tar.gz
emacs-5bc3b51d1ec7f6ff63e08d5e1c889a84a4eaf29c.zip
* net/tramp.el (tramp-root-regexp): Remove.
(tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate) (tramp-completion-file-name-regexp-url): Don't use leading volume letter on win32 systems. (Bug#5303, Bug#9311) (tramp-drop-volume-letter): Simplify definition. Suggested by Stefan Monnier <monnier@iro.umontreal.ca>.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/net/tramp.el24
2 files changed, 17 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 39cc42477e2..4fa4dfc5700 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12011-08-31 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-root-regexp): Remove.
4 (tramp-completion-file-name-regexp-unified)
5 (tramp-completion-file-name-regexp-separate)
6 (tramp-completion-file-name-regexp-url): Don't use leading volume
7 letter on win32 systems. (Bug#5303, Bug#9311)
8 (tramp-drop-volume-letter): Simplify definition. Suggested by
9 Stefan Monnier <monnier@iro.umontreal.ca>.
10
12011-08-30 Stefan Monnier <monnier@iro.umontreal.ca> 112011-08-30 Stefan Monnier <monnier@iro.umontreal.ca>
2 12
3 * subr.el (event-modifiers): Fix "missing modifier" part of docstring 13 * subr.el (event-modifiers): Fix "missing modifier" part of docstring
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 9b11ef58eab..274bc72391b 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -861,19 +861,9 @@ updated after changing this variable.
861Also see `tramp-file-name-structure'.") 861Also see `tramp-file-name-structure'.")
862 862
863;;;###autoload 863;;;###autoload
864(defconst tramp-root-regexp
865 (if (memq system-type '(cygwin windows-nt))
866 "\\`\\([a-zA-Z]:\\)?/"
867 "\\`/")
868 "Beginning of an incomplete Tramp file name.
869Usually, it is just \"\\\\`/\". On W32 systems, there might be a
870volume letter, which will be removed by `tramp-drop-volume-letter'.")
871
872;;;###autoload
873(defconst tramp-completion-file-name-regexp-unified 864(defconst tramp-completion-file-name-regexp-unified
874 (if (memq system-type '(cygwin windows-nt)) 865 (if (memq system-type '(cygwin windows-nt))
875 (concat tramp-root-regexp "[^/]\\{2,\\}\\'") 866 "\\`/[^/]\\{2,\\}\\'" "\\`/[^/]*\\'")
876 (concat tramp-root-regexp "[^/]*\\'"))
877 "Value for `tramp-completion-file-name-regexp' for unified remoting. 867 "Value for `tramp-completion-file-name-regexp' for unified remoting.
878GNU Emacs uses a unified filename syntax for Tramp and Ange-FTP. 868GNU Emacs uses a unified filename syntax for Tramp and Ange-FTP.
879See `tramp-file-name-structure' for more explanations. 869See `tramp-file-name-structure' for more explanations.
@@ -882,14 +872,14 @@ On W32 systems, the volume letter must be ignored.")
882 872
883;;;###autoload 873;;;###autoload
884(defconst tramp-completion-file-name-regexp-separate 874(defconst tramp-completion-file-name-regexp-separate
885 (concat tramp-root-regexp "\\([[][^]]*\\)?\\'") 875 "\\`/\\([[][^]]*\\)?\\'"
886 "Value for `tramp-completion-file-name-regexp' for separate remoting. 876 "Value for `tramp-completion-file-name-regexp' for separate remoting.
887XEmacs uses a separate filename syntax for Tramp and EFS. 877XEmacs uses a separate filename syntax for Tramp and EFS.
888See `tramp-file-name-structure' for more explanations.") 878See `tramp-file-name-structure' for more explanations.")
889 879
890;;;###autoload 880;;;###autoload
891(defconst tramp-completion-file-name-regexp-url 881(defconst tramp-completion-file-name-regexp-url
892 (concat tramp-root-regexp "[^/:]+\\(:\\(/\\(/[^/]*\\)?\\)?\\)?\\'") 882 "\\`/[^/:]+\\(:\\(/\\(/[^/]*\\)?\\)?\\)?\\'"
893 "Value for `tramp-completion-file-name-regexp' for URL-like remoting. 883 "Value for `tramp-completion-file-name-regexp' for URL-like remoting.
894See `tramp-file-name-structure' for more explanations.") 884See `tramp-file-name-structure' for more explanations.")
895 885
@@ -1494,20 +1484,20 @@ progress reporter."
1494(tramp-compat-font-lock-add-keywords 1484(tramp-compat-font-lock-add-keywords
1495 'emacs-lisp-mode '("\\<tramp-with-progress-reporter\\>")) 1485 'emacs-lisp-mode '("\\<tramp-with-progress-reporter\\>"))
1496 1486
1497(eval-and-compile ;; Silence compiler. 1487(defalias 'tramp-drop-volume-letter
1498 (if (memq system-type '(cygwin windows-nt)) 1488 (if (memq system-type '(cygwin windows-nt))
1499 (defun tramp-drop-volume-letter (name) 1489 (lambda (name)
1500 "Cut off unnecessary drive letter from file NAME. 1490 "Cut off unnecessary drive letter from file NAME.
1501The functions `tramp-*-handle-expand-file-name' call `expand-file-name' 1491The functions `tramp-*-handle-expand-file-name' call `expand-file-name'
1502locally on a remote file name. When the local system is a W32 system 1492locally on a remote file name. When the local system is a W32 system
1503but the remote system is Unix, this introduces a superfluous drive 1493but the remote system is Unix, this introduces a superfluous drive
1504letter into the file name. This function removes it." 1494letter into the file name. This function removes it."
1505 (save-match-data 1495 (save-match-data
1506 (if (string-match tramp-root-regexp name) 1496 (if (string-match "\\`[a-zA-Z]:/" name)
1507 (replace-match "/" nil t name) 1497 (replace-match "/" nil t name)
1508 name))) 1498 name)))
1509 1499
1510 (defalias 'tramp-drop-volume-letter 'identity))) 1500 'identity))
1511 1501
1512;;; Config Manipulation Functions: 1502;;; Config Manipulation Functions:
1513 1503