jwiegley/use-package — pull request #87 by Fuco1 (2014-02-13 12:01:10+00:00)
Title: Add `bind-keys` macro

I had this sitting in my config for a while so I've decided to contribute it upstream.

A `bind-keys` macro simplifies binding of many keys into specific keymaps and it can also create custom prefix maps conveniently.

For example, in my dired config I use

```scheme
(bind-keys :map dired-mode-map
("C-x C-f" . my-dired-ido-find-file)
("k" . my-dired-do-kill-lines)
("K" . my-dired-kill-subdir)
("P" . my-dired-parent-directory)
("I" . my-dired-maybe-insert-subdir)
;; and more...
)
```

To set up a prefix map for "documentation lookups" I use

```scheme
(bind-keys :prefix-map lisp-find-map
:prefix "C-h e"
("b" . free-keys)
("d" . info-lookup-symbol)
("f" . find-function)
("F" . find-face-definition)
;; and more...
)
```

That expands into

```scheme
(progn
(defvar lisp-find-map)
(define-prefix-command 'lisp-find-map)
(bind-key "C-h e" 'lisp-find-map)
(bind-key "C-h e b" 'free-keys)
(bind-key "C-h e d" 'info-lookup-symbol)
(bind-key "C-h e f" 'find-function)
(bind-key "C-h e F" 'find-face-definition))
```