diff options
| author | Kim F. Storm | 2002-10-27 21:31:19 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2002-10-27 21:31:19 +0000 |
| commit | d1a0acacb3fa88cb75a0367fc6b8c1e56779e5f9 (patch) | |
| tree | 455db79e5a8b024b90af686427d39691077a145d | |
| parent | 14781a94b23ad62fef949a8bdf219835df9a8297 (diff) | |
| download | emacs-d1a0acacb3fa88cb75a0367fc6b8c1e56779e5f9.tar.gz emacs-d1a0acacb3fa88cb75a0367fc6b8c1e56779e5f9.zip | |
(ido-cannot-complete-command): New defcustom, default to
ido-completion-help (similar to iswitchb-cannot-complete-hook).
(ido-complete): Call value of ido-cannot-complete-command rather
than ido-completion-help when no common completion.
| -rw-r--r-- | lisp/ido.el | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/ido.el b/lisp/ido.el index f9ba8178cba..93ecfc1755a 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -489,6 +489,15 @@ Value can be toggled within `ido' using `ido-toggle-prefix'." | |||
| 489 | :type 'boolean | 489 | :type 'boolean |
| 490 | :group 'ido) | 490 | :group 'ido) |
| 491 | 491 | ||
| 492 | (defcustom ido-cannot-complete-command 'ido-completion-help | ||
| 493 | "*Command run when `ido-complete' can't complete any more. | ||
| 494 | The most useful values are `ido-completion-help', which pops up a | ||
| 495 | window with completion alternatives, or `ido-next-match' or | ||
| 496 | `ido-prev-match', which cycle the buffer list." | ||
| 497 | :type 'function | ||
| 498 | :group 'ido) | ||
| 499 | |||
| 500 | |||
| 492 | (defcustom ido-record-commands t | 501 | (defcustom ido-record-commands t |
| 493 | "*Non-nil means that `ido' will record commands in command history. | 502 | "*Non-nil means that `ido' will record commands in command history. |
| 494 | Note that the non-ido equivalent command is recorded." | 503 | Note that the non-ido equivalent command is recorded." |
| @@ -1928,8 +1937,7 @@ If INITIAL is non-nil, it specifies the initial input string." | |||
| 1928 | 1937 | ||
| 1929 | ((not ido-matches) | 1938 | ((not ido-matches) |
| 1930 | (when ido-completion-buffer | 1939 | (when ido-completion-buffer |
| 1931 | (setq this-command 'ido-completion-help) | 1940 | (call-interactively (setq this-command ido-cannot-complete-command)))) |
| 1932 | (ido-completion-help))) | ||
| 1933 | 1941 | ||
| 1934 | ((= 1 (length ido-matches)) | 1942 | ((= 1 (length ido-matches)) |
| 1935 | ;; only one choice, so select it. | 1943 | ;; only one choice, so select it. |
| @@ -1946,7 +1954,7 @@ If INITIAL is non-nil, it specifies the initial input string." | |||
| 1946 | (delete-region (minibuffer-prompt-end) (point)) | 1954 | (delete-region (minibuffer-prompt-end) (point)) |
| 1947 | (insert res)) | 1955 | (insert res)) |
| 1948 | ;; else nothing to complete | 1956 | ;; else nothing to complete |
| 1949 | (ido-completion-help) | 1957 | (call-interactively (setq this-command ido-cannot-complete-command)) |
| 1950 | ))))) | 1958 | ))))) |
| 1951 | 1959 | ||
| 1952 | (defun ido-complete-space () | 1960 | (defun ido-complete-space () |