diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2007-11-24 15:40:09 +0000 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2007-11-24 15:40:09 +0000 |
commit | d9e43b70c686200c146bf0762a9f0b97ff309245 (patch) | |
tree | 0bc8af1e4358a18d281184166cf5db49fd6c7562 /lisp/ido.el | |
parent | 95ec6ea4b990b9ec424feee973a3a5ae3f8b23d0 (diff) | |
download | emacs-d9e43b70c686200c146bf0762a9f0b97ff309245.tar.gz |
* ido.el (ido-file-name-all-completions-1): Check for fboundp of
`tramp-completion-mode-p' as it is in Tramp 2.1. Let-bind
`tramp-completion-mode'.
Diffstat (limited to 'lisp/ido.el')
-rw-r--r-- | lisp/ido.el | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/lisp/ido.el b/lisp/ido.el index af8936b86d9..3801934fc3e 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -3373,24 +3373,25 @@ for first matching file." ;; Caller must have done that if necessary. ((and ido-enable-tramp-completion - (or (fboundp 'tramp-completion-mode) + (or (fboundp 'tramp-completion-mode-p) (require 'tramp nil t)) (string-match "\\`/[^/]+[:@]\\'" dir)) ;; Strip method:user@host: part of tramp completions. ;; Tramp completions do not include leading slash. - (let ((len (1- (length dir))) - (compl - (or (file-name-all-completions "" dir) - ;; work around bug in ange-ftp. - ;; /ftp:user@host: => nil - ;; /ftp:user@host:./ => ok - (and - (not (string= "/ftp:" dir)) - (tramp-tramp-file-p dir) - (fboundp 'tramp-ftp-file-name-p) - (funcall 'tramp-ftp-file-name-p dir) - (string-match ":\\'" dir) - (file-name-all-completions "" (concat dir "./")))))) + (let* ((len (1- (length dir))) + (tramp-completion-mode t) + (compl + (or (file-name-all-completions "" dir) + ;; work around bug in ange-ftp. + ;; /ftp:user@host: => nil + ;; /ftp:user@host:./ => ok + (and + (not (string= "/ftp:" dir)) + (tramp-tramp-file-p dir) + (fboundp 'tramp-ftp-file-name-p) + (funcall 'tramp-ftp-file-name-p dir) + (string-match ":\\'" dir) + (file-name-all-completions "" (concat dir "./")))))) (if (and compl (> (length (car compl)) len) (string= (substring (car compl) 0 len) (substring dir 1))) |