Browse files

Allow running 'where-is' for the selected command

  • Loading branch information...
1 parent fb05198 commit 4ae8eba3053e7983b4b244534a29ee217d72bf81 @rolandwalker rolandwalker committed with Aug 21, 2012
Showing with 7 additions and 0 deletions.
  1. +2 −0 README.markdown
  2. +5 −0 smex.el
@@ -50,6 +50,8 @@ currently selected command.
`M-.` jumps to the definition of the selected command.
+`C-h w` shows the key bindings for the selected command. (Via `where-is`.)
### Accessing new commands
Before accepting user input, Smex checks for new command definitions
and updates its caches accordingly.
@@ -150,6 +150,7 @@ Set this to nil to disable fuzzy matching."
(defun smex-prepare-ido-bindings ()
(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)
(define-key ido-completion-map (kbd "C-a") 'move-beginning-of-line))
@@ -385,6 +386,10 @@ Returns nil when reaching the end of the list."
(describe-function chosen)
(pop-to-buffer "*Help*"))))
+(defun smex-where-is ()
+ (interactive)
+ (smex-do-with-selected-item 'where-is))
(defun smex-find-function ()
(smex-do-with-selected-item 'find-function))

0 comments on commit 4ae8eba

Please sign in to comment.