]> git.eshelyaron.com Git - emacs.git/commitdiff
(ido-file-internal): Use current buffer's file name as default
authorKim F. Storm <storm@cua.dk>
Thu, 16 Nov 2006 09:07:16 +0000 (09:07 +0000)
committerKim F. Storm <storm@cua.dk>
Thu, 16 Nov 2006 09:07:16 +0000 (09:07 +0000)
choice for ido-find-alternate-file.  Suggested by Matt Hodges.

lisp/ido.el

index 97e285916d6098941669a7159ea3324ca07f2fbd..8844b12f5b7a939b909dfb6034c681dc33d8d267 100644 (file)
@@ -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