*** /home/albinus/src/emacs/lisp/net/tramp.el.~1.100.~ Mon Jul 17 22:40:00 2006 --- /home/albinus/src/emacs/lisp/net/tramp.el Tue Aug 22 07:41:49 2006 *************** *** 1928,1934 **** ;; Handlers for partial tramp file names. For Emacs just ;; `file-name-all-completions' is needed. ;;;###autoload ! (defconst tramp-completion-file-name-handler-alist '((file-name-all-completions . tramp-completion-handle-file-name-all-completions) (file-name-completion . tramp-completion-handle-file-name-completion)) "Alist of completion handler functions. --- 1928,1934 ---- ;; Handlers for partial tramp file names. For Emacs just ;; `file-name-all-completions' is needed. ;;;###autoload ! (defvar tramp-completion-file-name-handler-alist '((file-name-all-completions . tramp-completion-handle-file-name-all-completions) (file-name-completion . tramp-completion-handle-file-name-completion)) "Alist of completion handler functions. *************** *** 1936,1941 **** --- 1936,1945 ---- mentioned here will be handled by `tramp-file-name-handler-alist' or the normal Emacs functions.") + (when (memq system-type '(windows-nt)) + (add-to-list 'tramp-completion-file-name-handler-alist + '(expand-file-name . tramp-completion-handle-expand-file-name))) + ;; Handlers for foreign methods, like FTP or SMB, shall be plugged here. (defvar tramp-foreign-file-name-handler-alist ;; (identity . tramp-sh-file-name-handler) should always be the last *************** *** 4477,4482 **** --- 4481,4493 ---- last-input-event) ?\ )))))) t))) + (defun tramp-completion-handle-expand-file-name (name &optional dir) + "Like `expand-file-name' for tramp files." + (let ((fullname (concat (or dir default-directory) name))) + (funcall + (if (tramp-completion-mode fullname) 'tramp-drop-volume-letter 'identity) + (tramp-completion-run-real-handler 'expand-file-name (list name dir))))) + ;; Method, host name and user name completion. ;; `tramp-completion-dissect-file-name' returns a list of ;; tramp-file-name structures. For all of them we return possible completions.