changeset 74020:9843dfd8d011

(ido-file-internal): Use current buffer's file name as default choice for ido-find-alternate-file. Suggested by Matt Hodges.
author Kim F. Storm <storm@cua.dk>
date Thu, 16 Nov 2006 09:07:16 +0000
parents 830c1c6e16e8
children 234305495123
files lisp/ido.el
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ido.el	Thu Nov 16 09:07:03 2006 +0000
+++ b/lisp/ido.el	Thu Nov 16 09:07:16 2006 +0000
@@ -2270,7 +2270,9 @@
 	(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