From 628c97b2cf82344a957295a24f2a30298c0cbe40 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 3 Apr 2008 03:33:18 +0000 Subject: [PATCH] (tramp-drop-volume-letter): Move definition before use. --- lisp/net/tramp.el | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 685c6bda298..439636dcf2c 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1957,6 +1957,21 @@ FILE must be a local file name on a connection identified via VEC." (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 @@ This is like `dired-recursive-delete-directory' for Tramp files." ;; 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 -- 2.11.4.GIT