Fix a scoping issues with multiple occurrences of :bind

Fixes https://github.com/jwiegley/use-package/issues/585
This commit is contained in:
John Wiegley
2017-12-09 16:28:49 -08:00
parent 5a02d61ac6
commit ec84ed0dfb
3 changed files with 29 additions and 3 deletions

View File

@@ -1769,6 +1769,21 @@
t))
(bind-keys :package helm ("C-c d" . helm-mini)))))
(ert-deftest use-package-test/585 ()
(match-expansion
(use-package bug
:bind (:map bug-map ("C-a" . alpha))
:bind (("C-b" . beta)))
`(progn
(unless (fboundp 'alpha)
(autoload #'alpha "bug" nil t))
(unless (fboundp 'beta)
(autoload #'beta "bug" nil t))
(bind-keys :package bug :map bug-map
("C-a" . alpha))
(bind-keys :package bug
("C-b" . beta)))))
(ert-deftest bind-key/:prefix-map ()
(match-expansion
(bind-keys :prefix "<f1>"