# HG changeset patch # User Stefan Monnier # Date 1291242849 18000 # Node ID 8e856214e6e5585ae56bff1038a62f44d3418f12 # Parent 154433017097e34a86991697dee1ba3a658df698 * lisp/ido.el (ido-common-initilization): New function. (ido-mode): Use it. (ido-completing-read): Call it. diff -r 154433017097 -r 8e856214e6e5 lisp/ChangeLog --- a/lisp/ChangeLog Sat Nov 27 14:41:49 2010 -0500 +++ b/lisp/ChangeLog Wed Dec 01 17:34:09 2010 -0500 @@ -1,3 +1,9 @@ +2010-12-01 Leo + + * ido.el (ido-common-initilization): New function. (bug#3274) + (ido-mode): Use it. + (ido-completing-read): Call it. + 2010-11-27 Chong Yidong * log-edit.el (log-edit-font-lock-keywords): Don't try matching diff -r 154433017097 -r 8e856214e6e5 lisp/ido.el --- a/lisp/ido.el Sat Nov 27 14:41:49 2010 -0500 +++ b/lisp/ido.el Wed Dec 01 17:34:09 2010 -0500 @@ -1439,6 +1439,11 @@ ;; ido kill emacs hook (ido-save-history)) +(defun ido-common-initilization () + (ido-init-completion-maps) + (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) + (add-hook 'choose-completion-string-functions 'ido-choose-completion-string)) + (define-minor-mode ido-everywhere "Toggle using ido speed-ups everywhere file and directory names are read. With ARG, turn ido speed-up on if arg is positive, off otherwise." @@ -1482,12 +1487,9 @@ (t nil))) (ido-everywhere (if ido-everywhere 1 -1)) - (when ido-mode - (ido-init-completion-maps)) (when ido-mode - (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) - (add-hook 'choose-completion-string-functions 'ido-choose-completion-string) + (ido-common-initilization) (ido-load-history) (add-hook 'kill-emacs-hook 'ido-kill-emacs-hook) @@ -4679,6 +4681,8 @@ (ido-directory-too-big nil) (ido-context-switch-command 'ignore) (ido-choice-list choices)) + ;; Initialize ido before invoking ido-read-internal + (ido-common-initilization) (ido-read-internal 'list prompt hist def require-match initial-input))) (defun ido-unload-function ()