]> git.eshelyaron.com Git - emacs.git/commitdiff
Add comment explaining keyword-argument patch
authorRadon Rosborough <radon.neon@gmail.com>
Mon, 3 Apr 2017 17:40:46 +0000 (10:40 -0700)
committerRadon Rosborough <radon.neon@gmail.com>
Mon, 3 Apr 2017 17:40:46 +0000 (10:40 -0700)
lisp/use-package/use-package.el

index 440ffa02065a058e4faa38ea0554784bc65fb05a..02a358c714527a6a3e0102b43a72ba72895611a5 100644 (file)
@@ -969,6 +969,25 @@ If RECURSED is non-nil, recurse into sublists."
                   (prog1
                       (let ((ret (use-package-normalize-pairs
                                   key-pred val-pred name label x t)))
+                        ;; Currently, the handling of keyword
+                        ;; arguments by `use-package' and `bind-key'
+                        ;; is non-uniform and undocumented. As a
+                        ;; result, `use-package-normalize-pairs' (as
+                        ;; it is currently implemented) does not
+                        ;; correctly handle the keyword-argument
+                        ;; syntax of `bind-keys'. A permanent solution
+                        ;; to this problem will require a careful
+                        ;; consideration of the desired
+                        ;; keyword-argument interface for
+                        ;; `use-package' and `bind-key'. However, in
+                        ;; the meantime, we have a quick patch to fix
+                        ;; a serious bug in the handling of keyword
+                        ;; arguments. Namely, the code below would
+                        ;; normally unwrap lists that were passed as
+                        ;; keyword arguments (for example, the
+                        ;; `:filter' argument in `:bind') without
+                        ;; the (not (keywordp last-item)) clause. See
+                        ;; #447 for further discussion.
                         (if (and (listp ret) (not (keywordp last-item)))
                             (car ret)
                           ret))