Skip to content

Commit

Permalink
Ensure package-pinned-packages is bound before referencing it.
Browse files Browse the repository at this point in the history
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:
	 83aec5a Merge pull request #367 from ketbra/master
	 ec22352 Make pin and ensure compatible

Fixes #375
  • Loading branch information
appleby committed Aug 15, 2016
1 parent c191614 commit 06c8dc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion use-package.el
Expand Up @@ -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)
Expand Down

0 comments on commit 06c8dc9

Please sign in to comment.