From: Justin Talbott Date: Wed, 23 Sep 2015 15:06:58 +0000 (-0400) Subject: pass in symbol of bind macro, for more extensible re-use of same handler X-Git-Tag: emacs-29.0.90~1306^2~15^2~332^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6298e7e4775154fb1a48035293b60bb326ff54ea;p=emacs.git pass in symbol of bind macro, for more extensible re-use of same handler related to https://github.com/jwiegley/use-package/issues/258 --- diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 97b6ab30351..d3ed84a4038 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -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*)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;