From a9ffffcee5c8047db5b00625790ab9d1b1eccc4b Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Tue, 4 Apr 2017 21:16:06 -0700 Subject: [PATCH] Make use-package-normalize-value handle nil better The previous version of `use-package-normalize-value', when passed nil, would return the list (symbol-value (quote nil)). This meant that keywords which used `use-package-normalize-value' or the higher-level normalizer `use-package-normalize-test' would get a non-nil argument (i.e. the above list) even when the user specified nil to the package. This had the concrete impact of making it so that :defer-install nil was treated as :defer-install t. --- lisp/use-package/use-package.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 02a358c7145..74f1f309436 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -778,7 +778,8 @@ If the package is installed, its entry is removed from (defsubst use-package-normalize-value (label arg) "Normalize a value." - (cond ((symbolp arg) + (cond ((null arg) nil) + ((symbolp arg) `(symbol-value ',arg)) ((functionp arg) `(funcall #',arg)) -- 2.39.2