# HG changeset patch # User Kim F. Storm # Date 1112307765 0 # Node ID cc04bb9ef8b639921f5e210742ae35493b0333ae # Parent 9c457f96bb086bfa568d3ab5066716249b3aa51f (ido-file-internal): Fall back to non-ido command if initial directory is on slow ftp (or tramp) host. diff -r 9c457f96bb08 -r cc04bb9ef8b6 lisp/ido.el --- a/lisp/ido.el Thu Mar 31 22:22:29 2005 +0000 +++ b/lisp/ido.el Thu Mar 31 22:22:45 2005 +0000 @@ -1935,19 +1935,21 @@ ;; Internal function for ido-find-file and friends (unless item (setq item 'file)) - (let* ((ido-current-directory (ido-expand-directory default)) - (ido-directory-nonreadable (ido-nonreadable-directory-p ido-current-directory)) - (ido-directory-too-big (and (not ido-directory-nonreadable) - (ido-directory-too-big-p ido-current-directory))) - (ido-context-switch-command switch-cmd) - filename) - - (cond - ((or (not ido-mode) (ido-is-slow-ftp-host)) - (setq filename t - ido-exit 'fallback)) - - ((and (eq item 'file) + (let ((ido-current-directory (ido-expand-directory default)) + (ido-context-switch-command switch-cmd) + ido-directory-nonreadable ido-directory-too-big + filename) + + (if (or (not ido-mode) (ido-is-slow-ftp-host)) + (setq filename t + ido-exit 'fallback) + (setq ido-directory-nonreadable + (ido-nonreadable-directory-p ido-current-directory) + ido-directory-too-big + (and (not ido-directory-nonreadable) + (ido-directory-too-big-p ido-current-directory)))) + + (when (and (eq item 'file) (or ido-use-url-at-point ido-use-filename-at-point)) (let (fn d) (require 'ffap) @@ -1966,7 +1968,7 @@ (setq d (file-name-directory fn)) (file-directory-p d)) (setq ido-current-directory d) - (setq initial (file-name-nondirectory fn))))))) + (setq initial (file-name-nondirectory fn)))))) (let (ido-saved-vc-hb (vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends))