diff options
Diffstat (limited to 'lisp/use-package/bind-key.el')
-rw-r--r-- | lisp/use-package/bind-key.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/use-package/bind-key.el b/lisp/use-package/bind-key.el index 995e4816ff4..d907798ae76 100644 --- a/lisp/use-package/bind-key.el +++ b/lisp/use-package/bind-key.el @@ -91,6 +91,8 @@ ;; what the default was. Also, it will tell you if the key was rebound after ;; your binding it with `bind-key', and what it was rebound it to. +;;; Code: + (require 'cl-lib) (require 'easy-mmode) @@ -241,9 +243,9 @@ function symbol (unquoted)." (cl-flet ((wrap (map bindings) (if (and map pkg (not (eq map 'global-map))) - (if (boundp map) - bindings - `((eval-after-load + `((if (boundp ',map) + (progn ,@bindings) + (eval-after-load ,(if (symbolp pkg) `',pkg pkg) '(progn ,@bindings)))) bindings))) @@ -407,6 +409,7 @@ function symbol (unquoted)." (provide 'bind-key) ;; Local Variables: +;; outline-regexp: ";;;\\(;* [^\s\t\n]\\|###autoload\\)\\|(" ;; indent-tabs-mode: nil ;; End: |