]> git.eshelyaron.com Git - emacs.git/commitdiff
Refresh package list without blocking
authorPhilip Kaludercic <philipk@posteo.net>
Fri, 31 Jan 2025 07:55:02 +0000 (08:55 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 9 Feb 2025 08:46:56 +0000 (09:46 +0100)
* lisp/emacs-lisp/package.el (package-refresh-contents): Run
asynchronously when invoked interactively.
* etc/NEWS: Mention the change.

(cherry picked from commit 4cc8709ac2ceb0888ed1868292400049b98fe642)

lisp/emacs-lisp/package.el

index f9cce4f1149f9da2aaa162f2764137c93100659b..7981e328e2ecef813c45f830f85f0a8bb7d367c1 100644 (file)
@@ -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"