]> git.eshelyaron.com Git - emacs.git/commitdiff
Add a note to `bind-key` on the usage of the KEYMAP argument
authorJohn Wiegley <johnw@newartisans.com>
Mon, 4 Dec 2017 23:55:41 +0000 (15:55 -0800)
committerJohn Wiegley <johnw@newartisans.com>
Mon, 4 Dec 2017 23:55:41 +0000 (15:55 -0800)
Fixes https://github.com/jwiegley/use-package/issues/542

lisp/use-package/bind-key.el

index 1b11e6c8322923c47852d5175d805a30b28a7b15..54961ecd96e91b0905055dc9a7ec36f33de2a086 100644 (file)
@@ -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