diff options
| author | Leo Liu | 2010-12-01 17:34:09 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2010-12-01 17:34:09 -0500 |
| commit | bd794450721142e5774cb28ac534aa565d130001 (patch) | |
| tree | 8d849114647b11639001296923b2c7ffc3e9d818 | |
| parent | 402c8a49571227f8a4e678d4a6cdd6ba7841aef9 (diff) | |
| download | emacs-bd794450721142e5774cb28ac534aa565d130001.tar.gz emacs-bd794450721142e5774cb28ac534aa565d130001.zip | |
* lisp/ido.el (ido-common-initilization): New function.
(ido-mode): Use it.
(ido-completing-read): Call it.
Fixes: debbugs:3274
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/ido.el | 12 |
2 files changed, 14 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c6da166726b..12a1db25e0e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2010-12-01 Leo <sdl.web@gmail.com> | ||
| 2 | |||
| 3 | * ido.el (ido-common-initilization): New function. (bug#3274) | ||
| 4 | (ido-mode): Use it. | ||
| 5 | (ido-completing-read): Call it. | ||
| 6 | |||
| 1 | 2010-11-27 Chong Yidong <cyd@stupidchicken.com> | 7 | 2010-11-27 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 8 | ||
| 3 | * log-edit.el (log-edit-font-lock-keywords): Don't try matching | 9 | * log-edit.el (log-edit-font-lock-keywords): Don't try matching |
diff --git a/lisp/ido.el b/lisp/ido.el index a4409775a86..ee8bd4961db 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -1439,6 +1439,11 @@ Removes badly formatted data and ignored directories." | |||
| 1439 | ;; ido kill emacs hook | 1439 | ;; ido kill emacs hook |
| 1440 | (ido-save-history)) | 1440 | (ido-save-history)) |
| 1441 | 1441 | ||
| 1442 | (defun ido-common-initilization () | ||
| 1443 | (ido-init-completion-maps) | ||
| 1444 | (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) | ||
| 1445 | (add-hook 'choose-completion-string-functions 'ido-choose-completion-string)) | ||
| 1446 | |||
| 1442 | (define-minor-mode ido-everywhere | 1447 | (define-minor-mode ido-everywhere |
| 1443 | "Toggle using ido speed-ups everywhere file and directory names are read. | 1448 | "Toggle using ido speed-ups everywhere file and directory names are read. |
| 1444 | With ARG, turn ido speed-up on if arg is positive, off otherwise." | 1449 | With ARG, turn ido speed-up on if arg is positive, off otherwise." |
| @@ -1482,12 +1487,9 @@ This function also adds a hook to the minibuffer." | |||
| 1482 | (t nil))) | 1487 | (t nil))) |
| 1483 | 1488 | ||
| 1484 | (ido-everywhere (if ido-everywhere 1 -1)) | 1489 | (ido-everywhere (if ido-everywhere 1 -1)) |
| 1485 | (when ido-mode | ||
| 1486 | (ido-init-completion-maps)) | ||
| 1487 | 1490 | ||
| 1488 | (when ido-mode | 1491 | (when ido-mode |
| 1489 | (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) | 1492 | (ido-common-initilization) |
| 1490 | (add-hook 'choose-completion-string-functions 'ido-choose-completion-string) | ||
| 1491 | (ido-load-history) | 1493 | (ido-load-history) |
| 1492 | 1494 | ||
| 1493 | (add-hook 'kill-emacs-hook 'ido-kill-emacs-hook) | 1495 | (add-hook 'kill-emacs-hook 'ido-kill-emacs-hook) |
| @@ -4679,6 +4681,8 @@ DEF, if non-nil, is the default value." | |||
| 4679 | (ido-directory-too-big nil) | 4681 | (ido-directory-too-big nil) |
| 4680 | (ido-context-switch-command 'ignore) | 4682 | (ido-context-switch-command 'ignore) |
| 4681 | (ido-choice-list choices)) | 4683 | (ido-choice-list choices)) |
| 4684 | ;; Initialize ido before invoking ido-read-internal | ||
| 4685 | (ido-common-initilization) | ||
| 4682 | (ido-read-internal 'list prompt hist def require-match initial-input))) | 4686 | (ido-read-internal 'list prompt hist def require-match initial-input))) |
| 4683 | 4687 | ||
| 4684 | (defun ido-unload-function () | 4688 | (defun ido-unload-function () |