summaryrefslogtreecommitdiff
path: root/lisp/use-package
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2017-12-04 15:55:41 -0800
committerJohn Wiegley <johnw@newartisans.com>2017-12-04 15:55:41 -0800
commit277384d1512141b4577070f2dc50cd1560868272 (patch)
tree0f978bfdf482cf7f7bbee0598b712e60f41cd4a4 /lisp/use-package
parent2790bfc00618046d44a9c4817f1128ad2986fc10 (diff)
downloademacs-277384d1512141b4577070f2dc50cd1560868272.tar.gz
emacs-277384d1512141b4577070f2dc50cd1560868272.tar.bz2
emacs-277384d1512141b4577070f2dc50cd1560868272.zip
Add a note to `bind-key` on the usage of the KEYMAP argument
Fixes https://github.com/jwiegley/use-package/issues/542
Diffstat (limited to 'lisp/use-package')
-rw-r--r--lisp/use-package/bind-key.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/use-package/bind-key.el b/lisp/use-package/bind-key.el
index 1b11e6c8322..54961ecd96e 100644
--- a/lisp/use-package/bind-key.el
+++ b/lisp/use-package/bind-key.el
@@ -146,6 +146,13 @@ KEY-NAME may be a vector, in which case it is passed straight to
spelled-out keystrokes, e.g., \"C-c C-z\". See documentation of
`edmacro-mode' for details.
+COMMAND must be an interactive function or lambda form.
+
+KEYMAP, if present, should be a keymap and not a quoted symbol.
+For example:
+
+ (bind-key \"M-h\" #'some-interactive-function my-mode-map)
+
If PREDICATE is non-nil, it is a form evaluated to determine when
a key should be bound. It must return non-nil in such cases.
Emacs can evaluate this form at any time that it does redisplay