diff options
| author | Kim F. Storm | 2005-08-17 11:17:41 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2005-08-17 11:17:41 +0000 |
| commit | 5702da696e14251e22dec0fb243494cdf9ca3bb5 (patch) | |
| tree | 0ffd4e57988f21d9c1cc8c3645d2733ef1873d4c | |
| parent | 99cb6791eed5b5819e7d70f0d7ece84faa1d27e0 (diff) | |
| download | emacs-5702da696e14251e22dec0fb243494cdf9ca3bb5.tar.gz emacs-5702da696e14251e22dec0fb243494cdf9ca3bb5.zip | |
(ido-enter-matching-directory): Rename from
ido-enter-single-matching-directory. Change 'slash choice to
'only. Add 'first choice.
(ido-exhibit): Adapt to above changes.
| -rw-r--r-- | lisp/ido.el | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/lisp/ido.el b/lisp/ido.el index d0e6af667e8..9b887d1619d 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -688,12 +688,17 @@ not provide the normal completion. To show the completions, use C-a." | |||
| 688 | :type 'boolean | 688 | :type 'boolean |
| 689 | :group 'ido) | 689 | :group 'ido) |
| 690 | 690 | ||
| 691 | (defcustom ido-enter-single-matching-directory 'slash | 691 | (defcustom ido-enter-matching-directory 'only |
| 692 | "*Automatically enter sub-directory if it is the only matching item, if non-nil. | 692 | "*Additional methods to enter sub-directory of first/only matching item. |
| 693 | If value is 'slash, only enter if typing final slash, else do it always." | 693 | If value is 'first, enter first matching sub-directory when typing a slash. |
| 694 | If value is 'only, typing a slash only enters the sub-directory if it is | ||
| 695 | the only matching item. | ||
| 696 | If value is t, automatically enter a sub-directory when it is the only | ||
| 697 | matching item, even without typing a slash." | ||
| 694 | :type '(choice (const :tag "Never" nil) | 698 | :type '(choice (const :tag "Never" nil) |
| 695 | (const :tag "When typing /" slash) | 699 | (const :tag "Slash enters first directory" first) |
| 696 | (other :tag "Always" t)) | 700 | (const :tag "Slash enters first and only directory" only) |
| 701 | (other :tag "Always enter unique directory" t)) | ||
| 697 | :group 'ido) | 702 | :group 'ido) |
| 698 | 703 | ||
| 699 | (defcustom ido-create-new-buffer 'prompt | 704 | (defcustom ido-create-new-buffer 'prompt |
| @@ -3992,12 +3997,13 @@ For details of keybindings, do `\\[describe-function] ido-find-file'." | |||
| 3992 | (ido-set-matches) | 3997 | (ido-set-matches) |
| 3993 | (ido-trace "new " ido-matches) | 3998 | (ido-trace "new " ido-matches) |
| 3994 | 3999 | ||
| 3995 | (when (and ido-enter-single-matching-directory | 4000 | (when (and ido-enter-matching-directory |
| 3996 | ido-matches | 4001 | ido-matches |
| 3997 | (null (cdr ido-matches)) | 4002 | (or (eq ido-enter-matching-directory 'first) |
| 4003 | (null (cdr ido-matches))) | ||
| 3998 | (ido-final-slash (car ido-matches)) | 4004 | (ido-final-slash (car ido-matches)) |
| 3999 | (or try-single-dir-match | 4005 | (or try-single-dir-match |
| 4000 | (eq ido-enter-single-matching-directory t))) | 4006 | (eq ido-enter-matching-directory t))) |
| 4001 | (ido-trace "single match" (car ido-matches)) | 4007 | (ido-trace "single match" (car ido-matches)) |
| 4002 | (ido-set-current-directory | 4008 | (ido-set-current-directory |
| 4003 | (concat ido-current-directory (car ido-matches))) | 4009 | (concat ido-current-directory (car ido-matches))) |