[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#3274: ido-completing-read doesn't work unless ido-mode is executed
From: |
Stefan Monnier |
Subject: |
bug#3274: ido-completing-read doesn't work unless ido-mode is executed |
Date: |
Sun, 28 Nov 2010 15:50:19 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>> I also ran into this bug a while back but didn't stop to fix it.
>> Could you verify the following patch fixes the bug?
> --- a/lisp/ido.el
> +++ b/lisp/ido.el
> @@ -4853,6 +4853,9 @@ DEF, if non-nil, is the default value."
> (ido-directory-too-big nil)
> (ido-context-switch-command 'ignore)
> (ido-choice-list choices))
> + ;; Initialize ido before invoking ido-read-internal
> + (unless (keymapp ido-common-completion-map)
> + (let (ido-mode) (ido-mode 1)))
> (ido-read-internal 'list prompt hist def require-match initial-input)))
"(let (ido-mode) (ido-mode 1))" is an "ugly hack" (not only because it
calls (ido-mode 1) but because of the let-binding).
> Please consider this patch instead. While the previous fix is minimal it
> does a bit too much by calling (ido-mode 1).
Glad you found a better solution. Your patch looks good. Savannah is
down right now, so I'll install it later. Thanks.
Stefan