From: Mike Appleby Date: Mon, 15 Aug 2016 03:43:36 +0000 (-0500) Subject: Ensure package-pinned-packages is bound before referencing it X-Git-Tag: emacs-29.0.90~1306^2~15^2~289^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ef0cbfdc7332708587827f5fc7181e24d4f5af4d;p=emacs.git Ensure package-pinned-packages is bound before referencing it Add a bound-and-true-p guard to package-pinned-packages before referencing it in use-package-ensure-elpa. Package pinning was introduced in Emacs 24.4, and hence package-pinned-packages in unbound by default in earlier versions. Relevant commits: 72452b5 Merge pull request https://github.com/jwiegley/use-package/issues/367 from ketbra/master 5053f75 Make pin and ensure compatible Fixes https://github.com/jwiegley/use-package/issues/375 Copyright-paperwork-exempt: yes --- diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index a2f9883a110..427945ff5b0 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -500,7 +500,8 @@ manually updated package." (defun use-package-ensure-elpa (package &optional no-refresh) (if (package-installed-p package) t - (if (and (not no-refresh) (assoc package package-pinned-packages)) + (if (and (not no-refresh) + (assoc package (bound-and-true-p package-pinned-packages))) (package-read-all-archive-contents)) (if (or (assoc package package-archive-contents) no-refresh) (package-install package)