mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Merge pull request from thomasf/master
Refresh package.el archives if package is missing. GitHub-reference: https://github.com/jwiegley/use-package/issues/210
This commit is contained in:
commit
269b1080ae
1 changed files with 8 additions and 3 deletions
|
|
@ -434,9 +434,14 @@ manually updated package."
|
|||
(concat ":ensure wants an optional package name "
|
||||
"(an unquoted symbol name)")))))))
|
||||
|
||||
(defun use-package-ensure-elpa (package)
|
||||
(when (not (package-installed-p package))
|
||||
(package-install package)))
|
||||
(defun use-package-ensure-elpa (package &optional no-refresh)
|
||||
(if (package-installed-p package)
|
||||
t
|
||||
(if (or (assoc package package-archive-contents) no-refresh)
|
||||
(package-install package)
|
||||
(progn
|
||||
(package-refresh-contents)
|
||||
(use-package-ensure-elpa package t)))))
|
||||
|
||||
(defun use-package-handler/:ensure (name-symbol keyword ensure rest state)
|
||||
(let ((body (use-package-process-keywords name-symbol rest state)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue