# HG changeset patch # User Kim F. Storm # Date 1035325670 0 # Node ID 01727f34cb9dd8ab6eda2bdf0b1d164b74ed32fd # Parent 008dd713a1e0f4dd78d45fc26315acea7a39165c (ido-restrict-to-matches): New command. (ido-define-mode-map): Bind it to C-SPC and C-@ in ido-mode-map. diff -r 008dd713a1e0 -r 01727f34cb9d lisp/ido.el --- a/lisp/ido.el Tue Oct 22 22:27:39 2002 +0000 +++ b/lisp/ido.el Tue Oct 22 22:27:50 2002 +0000 @@ -1268,6 +1268,8 @@ (define-key map "\C-s" 'ido-next-match) (define-key map "\C-t" 'ido-toggle-regexp) (define-key map "\C-z" 'ido-undo-merge-work-directory) + (define-key map [(control ? )] 'ido-restrict-to-matches) + (define-key map [(control ?@)] 'ido-restrict-to-matches) (define-key map [right] 'ido-next-match) (define-key map [left] 'ido-prev-match) (define-key map "?" 'ido-completion-help) @@ -2361,6 +2363,16 @@ (if (> i 0) (setq ido-cur-list (ido-chop ido-cur-list (nth i ido-matches))))))) +(defun ido-restrict-to-matches () + "Set current item list to the currently matched items." + (interactive) + (when ido-matches + (setq ido-cur-list ido-matches + ido-text-init "" + ido-rescan nil + ido-exit 'keep) + (exit-minibuffer))) + (defun ido-chop (items elem) "Remove all elements before ELEM and put them at the end of ITEMS." (let ((ret nil)