changeset 76795:bcf68ba23417

(ido-read-internal): When reading file or dir, only override minibuffer-local-filename-completion-map, otherwise only override minibuffer-local-completion-map.
author Kim F. Storm <storm@cua.dk>
date Thu, 29 Mar 2007 22:33:22 +0000
parents fbe60d04cec2
children 5f487f7cb186
files lisp/ido.el
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ido.el	Thu Mar 29 21:24:38 2007 +0000
+++ b/lisp/ido.el	Thu Mar 29 22:33:22 2007 +0000
@@ -1940,8 +1940,14 @@
       (if (and ido-matches (eq ido-try-merged-list 'auto))
 	  (setq ido-try-merged-list t))
       (let
-	  ((minibuffer-local-completion-map ido-completion-map)
-	   (minibuffer-local-filename-completion-map ido-completion-map)
+	  ((minibuffer-local-completion-map
+	    (if (memq ido-cur-item '(file dir))
+		minibuffer-local-completion-map
+	      ido-completion-map))
+	   (minibuffer-local-filename-completion-map
+	    (if (memq ido-cur-item '(file dir))
+		ido-completion-map
+	      minibuffer-local-filename-completion-map))
 	   (max-mini-window-height (or ido-max-window-height
 				       (and (boundp 'max-mini-window-height) max-mini-window-height)))
 	   (ido-completing-read t)