mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-29 08:31:35 -08:00
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:72452b5Merge pull request https://github.com/jwiegley/use-package/issues/367 from ketbra/master5053f75Make pin and ensure compatible Fixes https://github.com/jwiegley/use-package/issues/375 Copyright-paperwork-exempt: yes
This commit is contained in:
parent
4629e86240
commit
ef0cbfdc73
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue