aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/ido.el
diff options
context:
space:
mode:
authorKim F. Storm <[email protected]>2005-03-31 22:22:45 +0000
committerKim F. Storm <[email protected]>2005-03-31 22:22:45 +0000
commit94da3cf11183e6ad3569140e666c4296c431f7e1 (patch)
tree6fd0bd5ed2623966c8e6417508d3e3957c5edad2 /lisp/ido.el
parent81f5c6a338ca8c62bca1f887573d12328c7d0a9a (diff)
(ido-file-internal): Fall back to non-ido command if
initial directory is on slow ftp (or tramp) host.
Diffstat (limited to 'lisp/ido.el')
-rw-r--r--lisp/ido.el30
1 files changed, 16 insertions, 14 deletions
diff --git a/lisp/ido.el b/lisp/ido.el
index 86a88d0d49..ddeecbb9b6 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1935,19 +1935,21 @@ If INITIAL is non-nil, it specifies the initial input string."
;; 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 @@ If INITIAL is non-nil, it specifies the initial input string."
(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))