From b001edf1620151c307768046270478cadad39995 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 6 Dec 2017 10:20:51 -0800 Subject: [PATCH] Add missing autoload cookie, and make lack of a normalizer an error Fixes https://github.com/jwiegley/use-package/issues/566 --- lisp/use-package/use-package-bind-key.el | 1 + lisp/use-package/use-package-core.el | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lisp/use-package/use-package-bind-key.el b/lisp/use-package/use-package-bind-key.el index 7c5d2725301..4a3d421522b 100644 --- a/lisp/use-package/use-package-bind-key.el +++ b/lisp/use-package/use-package-bind-key.el @@ -66,6 +66,7 @@ deferred until the prefix key sequence is pressed." (format "package.el %s failed to define keymap %s" package keymap-symbol))))) +;;;###autoload (defun use-package-normalize-binder (name keyword args) (let ((arg args) args*) diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index 7711806d195..4ab8a84a358 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -476,12 +476,8 @@ extending any keys already present." (tail (cdr xs)) (normalizer (intern (concat "use-package-normalize/" (symbol-name keyword)))) - (arg (cond ((functionp normalizer) - (funcall normalizer name keyword args)) - ((= (length args) 1) - (car args)) - (t - args)))) + (arg (and (functionp normalizer) + (funcall normalizer name keyword args)))) (if (memq keyword use-package-keywords) (progn (setq plist (use-package-normalize-plist -- 2.39.2