summaryrefslogtreecommitdiff
path: root/lisp/ido.el
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2006-11-16 09:07:16 +0000
committerKim F. Storm <storm@cua.dk>2006-11-16 09:07:16 +0000
commit033ecf787a3e1a250a43d179dec788f6c90c0482 (patch)
tree1a2e42c78a63df90d900587572b2dbd6307d84c9 /lisp/ido.el
parent9923717e0ba99114ee9a1048b3ec91257c3a275a (diff)
downloademacs-033ecf787a3e1a250a43d179dec788f6c90c0482.tar.gz
(ido-file-internal): Use current buffer's file name as default
choice for ido-find-alternate-file. Suggested by Matt Hodges.
Diffstat (limited to 'lisp/ido.el')
-rw-r--r--lisp/ido.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/ido.el b/lisp/ido.el
index 97e285916d6..8844b12f5b7 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -2270,7 +2270,9 @@ If INITIAL is non-nil, it specifies the initial input string."
(let ((minibuffer-completing-file-name t))
(setq filename (ido-read-internal item
(or prompt "Find file: ")
- 'ido-file-history nil nil initial))))
+ 'ido-file-history
+ (and (eq method 'alt-file) buffer-file-name)
+ nil initial))))
;; Choose the file name: either the text typed in, or the head
;; of the list of matches