changeset 97979:612227f6a51d

(ido-buffer-internal, ido-file-internal): Pass on other-window and other-frame methods when switching between file and buffer modes.
author Kim F. Storm <storm@cua.dk>
date Thu, 04 Sep 2008 10:01:45 +0000
parents 2346e1ef20cd
children 2570e504f856
files lisp/ido.el
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ido.el	Thu Sep 04 10:01:17 2008 +0000
+++ b/lisp/ido.el	Thu Sep 04 10:01:45 2008 +0000
@@ -2161,7 +2161,9 @@
 
       (cond
        ((eq ido-exit 'find-file)
-	(ido-file-internal ido-default-file-method nil nil nil nil ido-text))
+	(ido-file-internal
+	 (if (memq method '(other-window other-frame)) method ido-default-file-method)
+	 nil nil nil nil ido-text))
 
        ((eq ido-exit 'insert-file)
 	(ido-file-internal 'insert 'insert-file nil "Insert file: " nil ido-text 'ido-enter-insert-buffer))
@@ -2317,7 +2319,9 @@
 	  (call-interactively this-command)))
 
        ((eq ido-exit 'switch-to-buffer)
-	(ido-buffer-internal ido-default-buffer-method nil nil nil ido-text))
+	(ido-buffer-internal
+	 (if (memq method '(other-window other-frame)) method ido-default-buffer-method)
+	 nil nil nil ido-text))
 
        ((eq ido-exit 'insert-buffer)
 	(ido-buffer-internal 'insert 'insert-buffer "Insert buffer: " nil ido-text 'ido-enter-insert-file))