# HG changeset patch # User Kim F. Storm # Date 1163668036 0 # Node ID 9843dfd8d01148adaac76dcee5567bd46516712b # Parent 830c1c6e16e8ec22f7c28d90ece0de0b36661d46 (ido-file-internal): Use current buffer's file name as default choice for ido-find-alternate-file. Suggested by Matt Hodges. diff -r 830c1c6e16e8 -r 9843dfd8d011 lisp/ido.el --- 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