Refresh package list without blocking
* lisp/emacs-lisp/package.el (package-refresh-contents): Run asynchronously when invoked interactively. * etc/NEWS: Mention the change.
This commit is contained in:
parent
a0e1115caa
commit
4cc8709ac2
2 changed files with 9 additions and 2 deletions
4
etc/NEWS
4
etc/NEWS
|
@ -1096,6 +1096,10 @@ removing packages.
|
|||
When invoked with a prefix argument, 'package-install-selected-packages'
|
||||
will not prompt the user for confirmation before installing packages.
|
||||
|
||||
---
|
||||
*** 'package-refresh-contents' runs asynchronously
|
||||
Refreshing the package index will not block when invoked interactively.
|
||||
|
||||
** Xref
|
||||
|
||||
---
|
||||
|
|
|
@ -1858,8 +1858,11 @@ For each archive configured in the variable `package-archives',
|
|||
inform Emacs about the latest versions of all packages it offers,
|
||||
and make them available for download.
|
||||
Optional argument ASYNC specifies whether to perform the
|
||||
downloads in the background."
|
||||
(interactive)
|
||||
downloads in the background. This is always the case when the command
|
||||
is invoked interactively."
|
||||
(interactive (list t))
|
||||
(when async
|
||||
(message "Refreshing package contents..."))
|
||||
(unless (file-exists-p package-user-dir)
|
||||
(make-directory package-user-dir t))
|
||||
(let ((default-keyring (expand-file-name "package-keyring.gpg"
|
||||
|
|
Loading…
Add table
Reference in a new issue