From: John Wiegley Date: Wed, 6 Dec 2017 18:20:51 +0000 (-0800) Subject: Add missing autoload cookie, and make lack of a normalizer an error X-Git-Tag: emacs-29.0.90~1306^2~15^2~117 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b001edf162;p=emacs.git Add missing autoload cookie, and make lack of a normalizer an error Fixes https://github.com/jwiegley/use-package/issues/566 --- 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