[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master a6d87ea: Signal user-error on duplicate package ref
From: |
Stefan Kangas |
Subject: |
[Emacs-diffs] master a6d87ea: Signal user-error on duplicate package refresh |
Date: |
Thu, 22 Aug 2019 13:03:34 -0400 (EDT) |
branch: master
commit a6d87ea045d9df73f70765bedfb02522043efd9b
Author: Stefan Kangas <address@hidden>
Commit: Stefan Kangas <address@hidden>
Signal user-error on duplicate package refresh
* lisp/emacs-lisp/package.el (package-menu-refresh): Signal a
user-error if there is already a refresh running in the
background. Doc fix. (Bug#36707)
---
lisp/emacs-lisp/package.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index a72522a..4e0c046 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -3086,12 +3086,15 @@ Return (PKG-DESC [NAME VERSION STATUS DOC])."
"`package-archive-contents' before the latest refresh.")
(defun package-menu-refresh ()
- "Download the Emacs Lisp package archive.
-This fetches the contents of each archive specified in
-`package-archives', and then refreshes the package menu."
+ "In Package Menu, download the Emacs Lisp package archive.
+Fetch the contents of each archive specified in
+`package-archives', and then refresh the package menu. Signal a
+user-error if there is already a refresh running asynchronously."
(interactive)
(unless (derived-mode-p 'package-menu-mode)
(user-error "The current buffer is not a Package Menu"))
+ (when (and package-menu-async package--downloads-in-progress)
+ (user-error "Package refresh is already in progress, please wait..."))
(setq package-menu--old-archive-contents package-archive-contents)
(setq package-menu--new-package-list nil)
(package-refresh-contents package-menu-async))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master a6d87ea: Signal user-error on duplicate package refresh,
Stefan Kangas <=