emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105625: * net/tramp.el (tramp-root-r


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105625: * net/tramp.el (tramp-root-regexp): Remove.
Date: Wed, 31 Aug 2011 10:18:20 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105625
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Wed 2011-08-31 10:18:20 +0200
message:
  * 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 <address@hidden>.
modified:
  lisp/ChangeLog
  lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-08-30 22:43:43 +0000
+++ b/lisp/ChangeLog    2011-08-31 08:18:20 +0000
@@ -1,3 +1,13 @@
+2011-08-31  Michael Albinus  <address@hidden>
+
+       * 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 <address@hidden>.
+
 2011-08-30  Stefan Monnier  <address@hidden>
 
        * subr.el (event-modifiers): Fix "missing modifier" part of docstring

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2011-07-22 11:04:55 +0000
+++ b/lisp/net/tramp.el 2011-08-31 08:18:20 +0000
@@ -861,19 +861,9 @@
 Also see `tramp-file-name-structure'.")
 
 ;;;###autoload
-(defconst tramp-root-regexp
-  (if (memq system-type '(cygwin windows-nt))
-      "\\`\\([a-zA-Z]:\\)?/"
-    "\\`/")
-  "Beginning of an incomplete Tramp file name.
-Usually, it is just \"\\\\`/\".  On W32 systems, there might be a
-volume letter, which will be removed by `tramp-drop-volume-letter'.")
-
-;;;###autoload
 (defconst tramp-completion-file-name-regexp-unified
   (if (memq system-type '(cygwin windows-nt))
-      (concat tramp-root-regexp "[^/]\\{2,\\}\\'")
-    (concat tramp-root-regexp "[^/]*\\'"))
+      "\\`/[^/]\\{2,\\}\\'" "\\`/[^/]*\\'")
   "Value for `tramp-completion-file-name-regexp' for unified remoting.
 GNU Emacs uses a unified filename syntax for Tramp and Ange-FTP.
 See `tramp-file-name-structure' for more explanations.
@@ -882,14 +872,14 @@
 
 ;;;###autoload
 (defconst tramp-completion-file-name-regexp-separate
-  (concat tramp-root-regexp "\\([[][^]]*\\)?\\'")
+  "\\`/\\([[][^]]*\\)?\\'"
   "Value for `tramp-completion-file-name-regexp' for separate remoting.
 XEmacs uses a separate filename syntax for Tramp and EFS.
 See `tramp-file-name-structure' for more explanations.")
 
 ;;;###autoload
 (defconst tramp-completion-file-name-regexp-url
-  (concat tramp-root-regexp "[^/:]+\\(:\\(/\\(/[^/]*\\)?\\)?\\)?\\'")
+  "\\`/[^/:]+\\(:\\(/\\(/[^/]*\\)?\\)?\\)?\\'"
   "Value for `tramp-completion-file-name-regexp' for URL-like remoting.
 See `tramp-file-name-structure' for more explanations.")
 
@@ -1494,20 +1484,20 @@
 (tramp-compat-font-lock-add-keywords
  'emacs-lisp-mode '("\\<tramp-with-progress-reporter\\>"))
 
-(eval-and-compile                      ;; Silence compiler.
+(defalias 'tramp-drop-volume-letter
   (if (memq system-type '(cygwin windows-nt))
-      (defun tramp-drop-volume-letter (name)
+      (lambda (name)
        "Cut off unnecessary drive letter from file NAME.
 The functions `tramp-*-handle-expand-file-name' call `expand-file-name'
 locally on a remote file name.  When the local system is a W32 system
 but the remote system is Unix, this introduces a superfluous drive
 letter into the file name.  This function removes it."
        (save-match-data
-         (if (string-match tramp-root-regexp name)
+         (if (string-match "\\`[a-zA-Z]:/" name)
              (replace-match "/" nil t name)
            name)))
 
-    (defalias 'tramp-drop-volume-letter 'identity)))
+    'identity))
 
 ;;; Config Manipulation Functions:
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]