Commit d9e43b70 authored by Michael Albinus's avatar Michael Albinus
Browse files

* 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'.
parent 95ec6ea4
2007-11-24 Michael Albinus <michael.albinus@gmx.de>
* 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'.
2007-11-24 Thien-Thi Nguyen <ttn@gnuvola.org> 2007-11-24 Thien-Thi Nguyen <ttn@gnuvola.org>
* vc-git.el (vc-git-show-log-entry): New func. * vc-git.el (vc-git-show-log-entry): New func.
......
...@@ -3373,24 +3373,25 @@ for first matching file." ...@@ -3373,24 +3373,25 @@ for first matching file."
;; Caller must have done that if necessary. ;; Caller must have done that if necessary.
((and ido-enable-tramp-completion ((and ido-enable-tramp-completion
(or (fboundp 'tramp-completion-mode) (or (fboundp 'tramp-completion-mode-p)
(require 'tramp nil t)) (require 'tramp nil t))
(string-match "\\`/[^/]+[:@]\\'" dir)) (string-match "\\`/[^/]+[:@]\\'" dir))
;; Strip method:user@host: part of tramp completions. ;; Strip method:user@host: part of tramp completions.
;; Tramp completions do not include leading slash. ;; Tramp completions do not include leading slash.
(let ((len (1- (length dir))) (let* ((len (1- (length dir)))
(compl (tramp-completion-mode t)
(or (file-name-all-completions "" dir) (compl
;; work around bug in ange-ftp. (or (file-name-all-completions "" dir)
;; /ftp:user@host: => nil ;; work around bug in ange-ftp.
;; /ftp:user@host:./ => ok ;; /ftp:user@host: => nil
(and ;; /ftp:user@host:./ => ok
(not (string= "/ftp:" dir)) (and
(tramp-tramp-file-p dir) (not (string= "/ftp:" dir))
(fboundp 'tramp-ftp-file-name-p) (tramp-tramp-file-p dir)
(funcall 'tramp-ftp-file-name-p dir) (fboundp 'tramp-ftp-file-name-p)
(string-match ":\\'" dir) (funcall 'tramp-ftp-file-name-p dir)
(file-name-all-completions "" (concat dir "./")))))) (string-match ":\\'" dir)
(file-name-all-completions "" (concat dir "./"))))))
(if (and compl (if (and compl
(> (length (car compl)) len) (> (length (car compl)) len)
(string= (substring (car compl) 0 len) (substring dir 1))) (string= (substring (car compl) 0 len) (substring dir 1)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment