From 53bb14cfb7a4d51b4bf077955cba08e346a06720 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 21 Mar 2015 03:50:51 -0500 Subject: [PATCH] Add autoload stanzas to bind-key Fixes https://github.com/jwiegley/use-package/issues/33 --- lisp/use-package/bind-key.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/use-package/bind-key.el b/lisp/use-package/bind-key.el index 28b5dbb572b..5ae00396c27 100644 --- a/lisp/use-package/bind-key.el +++ b/lisp/use-package/bind-key.el @@ -132,6 +132,7 @@ Elements have the form ((KEY . [MAP]) CMD ORIGINAL-CMD)") +;;;###autoload (defmacro bind-key (key-name command &optional keymap) "Bind KEY-NAME to COMMAND in KEYMAP (`global-map' if not passed). @@ -161,12 +162,15 @@ spelled-out keystrokes, e.g., \"C-c C-z\". See documentation of personal-keybindings) (define-key (or ,keymap global-map) ,keyvar ,command)))) +;;;###autoload (defmacro unbind-key (key-name &optional keymap) `(bind-key ,key-name nil ,keymap)) +;;;###autoload (defmacro bind-key* (key-name command) `(bind-key ,key-name ,command override-global-map)) +;;;###autoload (defmacro bind-keys (&rest args) "Bind multiple keys at once. @@ -221,6 +225,7 @@ function symbol (unquoted)." `((bind-key ,(car form) ',(cdr form)))))) key-bindings)))))) +;;;###autoload (defmacro bind-keys* (&rest args) `(bind-keys :map override-global-map ,@args)) @@ -277,6 +282,7 @@ function symbol (unquoted)." (t (cons (string< (caar l) (caar r)) nil))))) +;;;###autoload (defun describe-personal-keybindings () "Display all the personal keybindings defined by `bind-key'." (interactive) @@ -329,7 +335,9 @@ function symbol (unquoted)." (setq last-binding binding))))) (provide 'bind-key) + ;; Local Variables: ;; indent-tabs-mode: nil ;; End: + ;;; bind-key.el ends here -- 2.39.2