aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Malabarba2015-04-12 03:55:21 +0100
committerArtur Malabarba2015-04-12 03:57:58 +0100
commit50ddc67739d14c4371e11ba52b91308efe21b3db (patch)
tree28821f7978218fa86b2022bb0e8a30301b214f91
parent6f87b180dd947da509a0737afee97531df107bb7 (diff)
downloademacs-50ddc67739d14c4371e11ba52b91308efe21b3db.tar.gz
emacs-50ddc67739d14c4371e11ba52b91308efe21b3db.zip
* lisp/emacs-lisp/package.el: Improve `package-menu-refresh'
(package-menu-refresh): Respect async and do new package checking. (list-packages): Use `package-menu-refresh' instead of repeating code.
-rw-r--r--lisp/emacs-lisp/package.el12
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 745c5bf5dc4..ad482e564b0 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2589,8 +2589,9 @@ This fetches the contents of each archive specified in
2589 (interactive) 2589 (interactive)
2590 (unless (derived-mode-p 'package-menu-mode) 2590 (unless (derived-mode-p 'package-menu-mode)
2591 (user-error "The current buffer is not a Package Menu")) 2591 (user-error "The current buffer is not a Package Menu"))
2592 (package-refresh-contents) 2592 (setq package-menu--old-archive-contents package-archive-contents)
2593 (package-menu--generate t t)) 2593 (setq package-menu--new-package-list nil)
2594 (package-refresh-contents package-menu-async))
2594 2595
2595(defun package-menu-describe-package (&optional button) 2596(defun package-menu-describe-package (&optional button)
2596 "Describe the current package. 2597 "Describe the current package.
@@ -2942,11 +2943,8 @@ The list is displayed in a buffer named `*Packages*'."
2942 (add-hook 'package--post-download-archives-hook 2943 (add-hook 'package--post-download-archives-hook
2943 #'package-menu--post-refresh) 2944 #'package-menu--post-refresh)
2944 2945
2945 (unless no-fetch 2946 ;; Fetch the remote list of packages.
2946 (setq package-menu--old-archive-contents package-archive-contents) 2947 (unless no-fetch (package-menu-refresh))
2947 (setq package-menu--new-package-list nil)
2948 ;; Fetch the remote list of packages.
2949 (package-refresh-contents package-menu-async))
2950 2948
2951 ;; Generate the Package Menu. 2949 ;; Generate the Package Menu.
2952 (let ((buf (get-buffer-create "*Packages*"))) 2950 (let ((buf (get-buffer-create "*Packages*")))