Browse files

Add partial minibuffer completion

Emacs' built-in completion mechanism works well for partial completions.
  • Loading branch information...
1 parent cfb8c03 commit 0372add4c67eb641e3ceee5340ffb771b487199e @vspinu vspinu committed with Dec 28, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 smex.el
@@ -135,7 +135,8 @@ Set this to nil to disable fuzzy matching."
(ido-setup-hook (cons 'smex-prepare-ido-bindings ido-setup-hook))
(ido-enable-prefix nil)
(ido-enable-flex-matching smex-flex-matching)
- (ido-max-prospects 10))
+ (ido-max-prospects 10)
+ (minibuffer-completion-table choices))
(ido-completing-read (smex-prompt-with-prefix-arg) choices nil nil
initial-input nil (car choices))))
@@ -153,6 +154,7 @@ Set this to nil to disable fuzzy matching."
(defun smex-prepare-ido-bindings ()
+ (define-key ido-completion-map (kbd "TAB") 'minibuffer-complete)
(define-key ido-completion-map (kbd "C-h f") 'smex-describe-function)
(define-key ido-completion-map (kbd "C-h w") 'smex-where-is)
(define-key ido-completion-map (kbd "M-.") 'smex-find-function)

0 comments on commit 0372add

Please sign in to comment.