1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(tramp-drop-volume-letter): Move definition before use.

This commit is contained in:
Glenn Morris 2008-04-03 03:33:18 +00:00
parent ab319633b1
commit 628c97b2cf

View file

@ -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 '("\\<with-connection-property\\>"))
(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