# HG changeset patch # User Glenn Morris # Date 1207193598 0 # Node ID 61bf6b37b78dc573eb89d42c0d3c025c5dce6aa1 # Parent 622e5fddb0430b11195c715a66d473618a8a53ef (tramp-drop-volume-letter): Move definition before use. diff -r 622e5fddb043 -r 61bf6b37b78d lisp/net/tramp.el --- a/lisp/net/tramp.el Thu Apr 03 03:32:40 2008 +0000 +++ b/lisp/net/tramp.el Thu Apr 03 03:33:18 2008 +0000 @@ -1957,6 +1957,21 @@ (put 'with-connection-property 'edebug-form-spec t) (font-lock-add-keywords 'emacs-lisp-mode '("\\")) +(eval-and-compile ; silence compiler + (if (memq system-type '(cygwin windows-nt)) + (defun tramp-drop-volume-letter (name) + "Cut off unnecessary drive letter from file NAME. +The function `tramp-handle-expand-file-name' calls `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) + (replace-match "/" nil t name) + name))) + + (defalias 'tramp-drop-volume-letter 'identity))) + (defsubst tramp-make-tramp-temp-file (vec) "Create a temporary file on the remote host identified by VEC. Return the local name of the temporary file." @@ -3485,21 +3500,6 @@ ;; Canonicalization of file names. -(eval-and-compile ; silence compiler - (if (memq system-type '(cygwin windows-nt)) - (defun tramp-drop-volume-letter (name) - "Cut off unnecessary drive letter from file NAME. -The function `tramp-handle-expand-file-name' calls `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) - (replace-match "/" nil t name) - name))) - - (defalias 'tramp-drop-volume-letter 'identity))) - (defun tramp-handle-expand-file-name (name &optional dir) "Like `expand-file-name' for Tramp files. If the localname part of the given filename starts with \"/../\" then