1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 15:00:45 -08:00

pass in symbol of bind macro, for more extensible re-use of same handler

related to https://github.com/jwiegley/use-package/issues/258
This commit is contained in:
Justin Talbott 2015-09-23 11:06:58 -04:00
parent 3e2747f174
commit 6298e7e477

View 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*))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;