1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-24 06:20:43 -08:00

Merge pull request from waymondo/extend-bind-handler

Pass in symbol of bind macro, for more extensible re-use of same handler
GitHub-reference: https://github.com/jwiegley/use-package/issues/259
This commit is contained in:
John Wiegley 2015-09-23 10:17:03 -07:00
commit 5dffc8c7cf

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