summaryrefslogtreecommitdiff
path: root/lisp/use-package/bind-key.el
diff options
context:
space:
mode:
authorRadon Rosborough <radon.neon@gmail.com>2017-04-02 21:03:47 -0700
committerRadon Rosborough <radon.neon@gmail.com>2017-04-02 21:03:47 -0700
commitd5d320e607e5b043aca42b087acd91a8e14d2e2f (patch)
treeba552ccd51d470513d7bf06b637a8d0cc4ebeecc /lisp/use-package/bind-key.el
parent9f90129b95c67633e764f82bab6eaed215fb0696 (diff)
downloademacs-d5d320e607e5b043aca42b087acd91a8e14d2e2f.tar.gz
emacs-d5d320e607e5b043aca42b087acd91a8e14d2e2f.tar.bz2
emacs-d5d320e607e5b043aca42b087acd91a8e14d2e2f.zip
Don't mutilate keyword arguments in :bind
The parsing logic in `use-package-normalize-pairs' is not designed to deal with keyword arguments. However, `use-package-normalize-pairs' is used to process the arguments to :bind, which can include keyword arguments. These keyword arguments are supposed to be passed untouched to the underlying `bind-keys' function, but there is a clause in `use-package-normalize-pairs' that replaces lists with their first element. Thus an invocation like: (use-package company :bind (:map company-active-map :filter (company-explicit-action-p) ("RET" . company-complete-selection))) Generates code like this: (bind-keys :map company-active-map :filter company-explicit-action-p ("RET" . company-complete-selection)) Which generates an error since `company-explicit-action-p' is now being referenced as a variable rather than a function. The proper solution is to refactor the logic that goes into parsing uses of :bind, but this commit adds a temporary patch to eliminate the above problem, while trying to be as reverse-compatible as possible. In particular it just inhibits the list-to-first-element transformation when the previous element processed was a keyword.
Diffstat (limited to 'lisp/use-package/bind-key.el')
0 files changed, 0 insertions, 0 deletions