unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8329: 23.3.50; [PATCH] Get rid of one ido ugliness
@ 2011-03-23 16:57 Leo
  2011-03-23 20:27 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Leo @ 2011-03-23 16:57 UTC (permalink / raw)
  To: 8329

The following patch replaces ugly completing-read form with a simpler
and cleaner read-from-minibuffer.


=== modified file 'lisp/ido.el'
--- lisp/ido.el	2011-03-21 17:48:36 +0000
+++ lisp/ido.el	2011-03-23 16:47:26 +0000
@@ -1964,17 +1964,9 @@
       (ido-set-matches)
       (if (and ido-matches (eq ido-try-merged-list 'auto))
 	  (setq ido-try-merged-list t))
-      (let
-	  ((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)))
+      (let ((max-mini-window-height (or ido-max-window-height
+					(and (boundp 'max-mini-window-height)
+					     max-mini-window-height)))
 	   (ido-completing-read t)
 	   (ido-require-match require-match)
 	   (ido-use-mycompletion-depth (1+ (minibuffer-depth)))
@@ -1985,12 +1977,11 @@
 	(setq ido-exit nil)
 	(setq ido-final-text
 	      (catch 'ido
-		(completing-read-default
-		 (ido-make-prompt item prompt)
-		 '(("dummy" . 1)) nil nil ; table predicate require-match
-		 (prog1 ido-text-init (setq ido-text-init nil))	;initial-contents
-		 history))))
-      (ido-trace "completing-read" ido-final-text)
+		(read-from-minibuffer (ido-make-prompt item prompt)
+				      (prog1 ido-text-init
+					(setq ido-text-init nil))
+				      ido-completion-map nil history))))
+      (ido-trace "read-from-minibuffer" ido-final-text)
       (if (get-buffer ido-completion-buffer)
 	  (kill-buffer ido-completion-buffer))
 






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-27  1:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-23 16:57 bug#8329: 23.3.50; [PATCH] Get rid of one ido ugliness Leo
2011-03-23 20:27 ` Stefan Monnier
2011-03-24 14:34   ` Leo
2011-03-25  0:48     ` Leo
2011-03-27  1:28       ` Leo

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).