]> git.eshelyaron.com Git - emacs.git/commitdiff
pass in symbol of bind macro, for more extensible re-use of same handler
authorJustin Talbott <justin@waymondo.com>
Wed, 23 Sep 2015 15:06:58 +0000 (11:06 -0400)
committerJustin Talbott <justin@waymondo.com>
Wed, 23 Sep 2015 15:06:58 +0000 (11:06 -0400)
related to https://github.com/jwiegley/use-package/issues/258

lisp/use-package/use-package.el

index 97b6ab3035188e65c07b369859b2797d23c43e40..d3ed84a4038798237c0763e97e7c2c049e6e235f 100644 (file)
@@ -663,7 +663,7 @@ manually updated package."
 (defalias 'use-package-normalize/:bind* 'use-package-normalize-binder)
 
 (defun use-package-handler/:bind
-    (name keyword arg rest state &optional override)
+    (name keyword arg rest state &optional bind-macro)
   (let ((commands (remq nil (mapcar #'(lambda (arg)
                                         (if (listp arg)
                                             (cdr arg)
@@ -673,10 +673,10 @@ manually updated package."
        (use-package-sort-keywords
         (use-package-plist-maybe-put rest :defer t))
        (use-package-plist-append state :commands commands))
-     `((ignore (,(if override 'bind-keys* 'bind-keys) ,@arg))))))
+     `((ignore (,(if bind-macro bind-macro 'bind-keys) ,@arg))))))
 
 (defun use-package-handler/:bind* (name keyword arg rest state)
-  (use-package-handler/:bind name keyword arg rest state t))
+  (use-package-handler/:bind name keyword arg rest state 'bind-keys*))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;