;; 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
(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
;;;###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
(use-package-ensure-elpa 'hydra '(t) 'nil)
(require 'hydra nil nil))))
+(ert-deftest use-package-test/558 ()
+ (match-expansion
+ (bind-keys* :package org-ref
+ ("C-c C-r" . org-ref-helm-insert-cite-link))
+ `(bind-key "C-c C-r" #'org-ref-helm-insert-cite-link override-global-map nil)))
+
(ert-deftest bind-key/:prefix-map ()
(match-expansion
(bind-keys :prefix "<f1>"