summaryrefslogtreecommitdiff
path: root/lisp/use-package
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2017-12-05 10:29:04 -0800
committerJohn Wiegley <johnw@newartisans.com>2017-12-05 10:29:51 -0800
commita090961f105595b6c9b56c0e5cda567c76687b06 (patch)
tree9f76c55cd0c6b5cdd994b8dbc1e42a97aa26b43f /lisp/use-package
parent10fd4577d012789348a79c0e3ffedf54089e1ec4 (diff)
downloademacs-a090961f105595b6c9b56c0e5cda567c76687b06.tar.gz
emacs-a090961f105595b6c9b56c0e5cda567c76687b06.tar.bz2
emacs-a090961f105595b6c9b56c0e5cda567c76687b06.zip
Fix bad interaction between bind-keys* and the :package keyword
Fixes https://github.com/jwiegley/use-package/issues/558
Diffstat (limited to 'lisp/use-package')
-rw-r--r--lisp/use-package/bind-key.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/use-package/bind-key.el b/lisp/use-package/bind-key.el
index 54961ecd96e..f5477945b4b 100644
--- a/lisp/use-package/bind-key.el
+++ b/lisp/use-package/bind-key.el
@@ -222,8 +222,10 @@ function symbol (unquoted)."
;; jww (2016-02-26): This is a hack; this whole function needs to be
;; rewritten to normalize arguments the way that use-package.el does.
(if (and (eq (car args) :package)
- (not (eq (car (cdr (cdr args))) :map)))
+ (not (eq (car (cdr (cdr args))) :map))
+ (not keymap))
(setq args (cons :map (cons 'global-map args))))
+
(let ((map keymap)
doc
prefix-map
@@ -267,7 +269,7 @@ function symbol (unquoted)."
(cl-flet
((wrap (map bindings)
- (if (and map pkg (not (eq map 'global-map)))
+ (if (and map pkg (not (memq map '(global-map override-global-map))))
`((if (boundp ',map)
(progn ,@bindings)
(eval-after-load
@@ -320,8 +322,7 @@ function symbol (unquoted)."
;;;###autoload
(defmacro bind-keys* (&rest args)
- (macroexp-progn
- (bind-keys-form args 'override-global-map)))
+ (macroexp-progn (bind-keys-form args 'override-global-map)))
(defun get-binding-description (elem)
(cond